tabexseriescomponents 0.0.174 → 0.0.176
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/{npmpackage.zip → 20-10YoussefLibrary.zip} +0 -0
- package/LibraryYoussef7-11.zip +0 -0
- package/dist/index.cjs.js +67 -272
- package/dist/index.esm.js +67 -272
- package/dist/index.umd.js +67 -272
- package/package.json +1 -1
- package/src.zip +0 -0
- package/{ +0 -0
|
Binary file
|
|
Binary file
|
package/dist/index.cjs.js
CHANGED
|
@@ -8435,6 +8435,8 @@ var Filter$1 = function Filter(props) {
|
|
|
8435
8435
|
var ProductFilterObjContext = props.actions.ProductFilterObjContext;
|
|
8436
8436
|
var setProductFilterObjContext = props.actions.setProductFilterObjContext;
|
|
8437
8437
|
var authdetailsContext = props.actions.authdetailsContext;
|
|
8438
|
+
var routingcountext = props.actions.routingcountext;
|
|
8439
|
+
var StaticPagesLinksContext = props.actions.StaticPagesLinksContext;
|
|
8438
8440
|
var _useState = React.useState(''),
|
|
8439
8441
|
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
8440
8442
|
sectionproperties = _useState2[0],
|
|
@@ -8496,15 +8498,17 @@ var Filter$1 = function Filter(props) {
|
|
|
8496
8498
|
}, [ProductFilterObjContext]);
|
|
8497
8499
|
var filterupdater = function filterupdater() {
|
|
8498
8500
|
if (instfilters.length != 0) {
|
|
8501
|
+
var _ProductFilterObjCont;
|
|
8499
8502
|
var tempinstfilters = _toConsumableArray__default["default"](instfilters);
|
|
8500
|
-
tempinstfilters.forEach(function (instfilteritem, instfilterindex) {
|
|
8503
|
+
tempinstfilters === null || tempinstfilters === void 0 ? void 0 : tempinstfilters.forEach(function (instfilteritem, instfilterindex) {
|
|
8501
8504
|
instfilteritem.productvaluesfilter.forEach(function (valefilteritem, valefilteritemindex) {
|
|
8502
8505
|
valefilteritem.isfilterselected = false;
|
|
8503
8506
|
});
|
|
8504
8507
|
});
|
|
8505
|
-
ProductFilterObjContext.FilterOptions.forEach(function (filteritem, filterindex) {
|
|
8506
|
-
tempinstfilters.forEach(function (instfilteritem, instfilterindex) {
|
|
8507
|
-
|
|
8508
|
+
ProductFilterObjContext === null || ProductFilterObjContext === void 0 ? void 0 : (_ProductFilterObjCont = ProductFilterObjContext.FilterOptions) === null || _ProductFilterObjCont === void 0 ? void 0 : _ProductFilterObjCont.forEach(function (filteritem, filterindex) {
|
|
8509
|
+
tempinstfilters === null || tempinstfilters === void 0 ? void 0 : tempinstfilters.forEach(function (instfilteritem, instfilterindex) {
|
|
8510
|
+
var _instfilteritem$produ;
|
|
8511
|
+
instfilteritem === null || instfilteritem === void 0 ? void 0 : (_instfilteritem$produ = instfilteritem.productvaluesfilter) === null || _instfilteritem$produ === void 0 ? void 0 : _instfilteritem$produ.forEach(function (valefilteritem, valefilteritemindex) {
|
|
8508
8512
|
if (filteritem.valueid == valefilteritem.valueid) {
|
|
8509
8513
|
valefilteritem.isfilterselected = true;
|
|
8510
8514
|
}
|
|
@@ -8514,12 +8518,13 @@ var Filter$1 = function Filter(props) {
|
|
|
8514
8518
|
setinstfilters(_toConsumableArray__default["default"](tempinstfilters));
|
|
8515
8519
|
}
|
|
8516
8520
|
if (instcollections.length != 0) {
|
|
8521
|
+
var _ProductFilterObjCont2;
|
|
8517
8522
|
var tempInstcollections = _toConsumableArray__default["default"](instcollections);
|
|
8518
8523
|
tempInstcollections.forEach(function (instfilteritem, valefilteritemindex) {
|
|
8519
8524
|
instfilteritem.isfilterselected = false;
|
|
8520
8525
|
});
|
|
8521
|
-
ProductFilterObjContext.collections.forEach(function (filteritem, filterindex) {
|
|
8522
|
-
tempInstcollections.forEach(function (instfilteritem, instfilterindex) {
|
|
8526
|
+
ProductFilterObjContext === null || ProductFilterObjContext === void 0 ? void 0 : (_ProductFilterObjCont2 = ProductFilterObjContext.collections) === null || _ProductFilterObjCont2 === void 0 ? void 0 : _ProductFilterObjCont2.forEach(function (filteritem, filterindex) {
|
|
8527
|
+
tempInstcollections === null || tempInstcollections === void 0 ? void 0 : tempInstcollections.forEach(function (instfilteritem, instfilterindex) {
|
|
8523
8528
|
if (instfilteritem.collectionid == filteritem) {
|
|
8524
8529
|
instfilteritem.isfilterselected = true;
|
|
8525
8530
|
}
|
|
@@ -8533,8 +8538,9 @@ var Filter$1 = function Filter(props) {
|
|
|
8533
8538
|
if (type == 'clearfilters') {
|
|
8534
8539
|
tempfetchproductsfilerobjcontext.FilterOptions = [];
|
|
8535
8540
|
} else {
|
|
8541
|
+
var _tempfetchproductsfil;
|
|
8536
8542
|
var FilterExists = false;
|
|
8537
|
-
tempfetchproductsfilerobjcontext.FilterOptions.forEach(function (filteritem, filterindex) {
|
|
8543
|
+
tempfetchproductsfilerobjcontext === null || tempfetchproductsfilerobjcontext === void 0 ? void 0 : (_tempfetchproductsfil = tempfetchproductsfilerobjcontext.FilterOptions) === null || _tempfetchproductsfil === void 0 ? void 0 : _tempfetchproductsfil.forEach(function (filteritem, filterindex) {
|
|
8538
8544
|
if (filteritem.valueid == valueid) {
|
|
8539
8545
|
FilterExists = true;
|
|
8540
8546
|
tempfetchproductsfilerobjcontext.FilterOptions.splice(filterindex, 1);
|
|
@@ -8551,12 +8557,15 @@ var Filter$1 = function Filter(props) {
|
|
|
8551
8557
|
} else {
|
|
8552
8558
|
tempfetchproductsfilerobjcontext.isfilter = 1;
|
|
8553
8559
|
}
|
|
8560
|
+
tempfetchproductsfilerobjcontext.page = 0;
|
|
8554
8561
|
setProductFilterObjContext(_objectSpread$1C({}, tempfetchproductsfilerobjcontext));
|
|
8562
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, encodeURIComponent(JSON.stringify(tempfetchproductsfilerobjcontext)));
|
|
8555
8563
|
};
|
|
8556
8564
|
var setCollectionFilterFunc = function setCollectionFilterFunc(collectionid) {
|
|
8565
|
+
var _tempfetchproductsfil2;
|
|
8557
8566
|
var tempfetchproductsfilerobjcontext = _objectSpread$1C({}, ProductFilterObjContext);
|
|
8558
8567
|
var CollectionExists = false;
|
|
8559
|
-
tempfetchproductsfilerobjcontext.collections.forEach(function (filteritem, filterindex) {
|
|
8568
|
+
tempfetchproductsfilerobjcontext === null || tempfetchproductsfilerobjcontext === void 0 ? void 0 : (_tempfetchproductsfil2 = tempfetchproductsfilerobjcontext.collections) === null || _tempfetchproductsfil2 === void 0 ? void 0 : _tempfetchproductsfil2.forEach(function (filteritem, filterindex) {
|
|
8560
8569
|
if (filteritem == collectionid) {
|
|
8561
8570
|
CollectionExists = true;
|
|
8562
8571
|
tempfetchproductsfilerobjcontext.collections.splice(filterindex, 1);
|
|
@@ -8565,7 +8574,9 @@ var Filter$1 = function Filter(props) {
|
|
|
8565
8574
|
if (!CollectionExists) {
|
|
8566
8575
|
tempfetchproductsfilerobjcontext.collections.push(collectionid);
|
|
8567
8576
|
}
|
|
8577
|
+
tempfetchproductsfilerobjcontext.page = 0;
|
|
8568
8578
|
setProductFilterObjContext(_objectSpread$1C({}, tempfetchproductsfilerobjcontext));
|
|
8579
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, encodeURIComponent(JSON.stringify(tempfetchproductsfilerobjcontext)));
|
|
8569
8580
|
};
|
|
8570
8581
|
var filter_cssstyles = {
|
|
8571
8582
|
collapsetitle: glamor.css({
|
|
@@ -8808,6 +8819,7 @@ var Filter$1 = function Filter(props) {
|
|
|
8808
8819
|
tempfetchproductsfilerobjcontext[item.payloadvalue] = valueitem.value;
|
|
8809
8820
|
}
|
|
8810
8821
|
setProductFilterObjContext(_objectSpread$1C({}, tempfetchproductsfilerobjcontext));
|
|
8822
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, encodeURIComponent(JSON.stringify(tempfetchproductsfilerobjcontext)));
|
|
8811
8823
|
}
|
|
8812
8824
|
}, /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
8813
8825
|
className: " ".concat(ischecked ? filter_cssstyles.btn_item_active : '', " ").concat(filterstyles.btn_item, " ").concat(filter_cssstyles.btn_item) + ' mb-2 d-flex align-items-center '
|
|
@@ -9271,6 +9283,13 @@ var CardsSection = function CardsSection(props) {
|
|
|
9271
9283
|
// }
|
|
9272
9284
|
// }, [inView]);
|
|
9273
9285
|
React.useEffect(function () {
|
|
9286
|
+
if (props.filterparamsprops != undefined) {
|
|
9287
|
+
var filterpar = decodeURIComponent(props.filterparamsprops);
|
|
9288
|
+
var filterparsed = JSON.parse(filterpar);
|
|
9289
|
+
if (filterparsed != undefined) {
|
|
9290
|
+
setProductFilterObjContext(filterparsed);
|
|
9291
|
+
}
|
|
9292
|
+
}
|
|
9274
9293
|
StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
|
|
9275
9294
|
if (sectionitem.sectionid == props.sectionidprops) {
|
|
9276
9295
|
var secpropobj = {};
|
|
@@ -9340,7 +9359,9 @@ var CardsSection = function CardsSection(props) {
|
|
|
9340
9359
|
var tempfetchproductsfilerobjcontext = ProductFilterObjContext;
|
|
9341
9360
|
tempfetchproductsfilerobjcontext.ProductFetchingType = ProductsFetchingTypeSectionObj.productfetchingtype;
|
|
9342
9361
|
if (ProductsFetchingTypeSectionObj.grouptype == 'collections' || ProductsFetchingTypeSectionObj.grouptype == 'categories' || ProductsFetchingTypeSectionObj.grouptype == 'parentcollections') ; else {
|
|
9343
|
-
tempfetchproductsfilerobjcontext.collections
|
|
9362
|
+
if (tempfetchproductsfilerobjcontext.collections != undefined) {
|
|
9363
|
+
tempfetchproductsfilerobjcontext.collections.push(ProductsFetchingTypeSectionObj.collectionid);
|
|
9364
|
+
}
|
|
9344
9365
|
}
|
|
9345
9366
|
tempfetchproductsfilerobjcontext.grouptype = ProductsFetchingTypeSectionObj.grouptype;
|
|
9346
9367
|
tempfetchproductsfilerobjcontext.grouptyperefid = ProductsFetchingTypeSectionObj.grouptyperefid;
|
|
@@ -9567,18 +9588,26 @@ var CardsSection = function CardsSection(props) {
|
|
|
9567
9588
|
var handlePageClick = function handlePageClick(event) {
|
|
9568
9589
|
props.scrolltotop();
|
|
9569
9590
|
var tempProductFilterObjContext = _objectSpread$1B({}, ProductFilterObjContext);
|
|
9570
|
-
tempProductFilterObjContext.page = event.selected;
|
|
9591
|
+
tempProductFilterObjContext.page = event === null || event === void 0 ? void 0 : event.selected;
|
|
9571
9592
|
setProductFilterObjContext(_objectSpread$1B({}, tempProductFilterObjContext));
|
|
9593
|
+
var pasturl = '';
|
|
9594
|
+
if (props.grouptypeprops != undefined) {
|
|
9595
|
+
if (props.collectionidprops != undefined) {
|
|
9596
|
+
pasturl = props.grouptypeprops + '/' + props.collectionidprops + '/';
|
|
9597
|
+
}
|
|
9598
|
+
}
|
|
9599
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, pasturl + encodeURIComponent(JSON.stringify(tempProductFilterObjContext)));
|
|
9572
9600
|
};
|
|
9573
9601
|
function PaginatedItems(_ref) {
|
|
9574
9602
|
var _fetchProductsQuery$d7, _fetchProductsQuery$d8, _fetchProductsQuery$d9, _fetchProductsQuery$d10;
|
|
9575
9603
|
_ref.itemsPerPage;
|
|
9576
9604
|
// Here we use item offsets; we could also use page offsets
|
|
9577
9605
|
// following the API or data you're working with.
|
|
9578
|
-
|
|
9579
|
-
|
|
9580
|
-
|
|
9581
|
-
|
|
9606
|
+
// const [itemOffset, setItemOffset] = useState(0);
|
|
9607
|
+
// Simulate fetching items from another resources.
|
|
9608
|
+
// (This could be items from props; or items loaded in a local state
|
|
9609
|
+
// from an API endpoint with useEffect and useState)
|
|
9610
|
+
// const endOffset = itemOffset + itemsPerPage;
|
|
9582
9611
|
|
|
9583
9612
|
// const currentItems = items.slice(itemOffset, endOffset);
|
|
9584
9613
|
// const pageCount = Math.ceil(items.length / itemsPerPage);
|
|
@@ -28867,11 +28896,10 @@ var CardsSection2 = function CardsSection2(props) {
|
|
|
28867
28896
|
}
|
|
28868
28897
|
} else if (fetchingtype == 'products') {
|
|
28869
28898
|
if (fetchProductsQuery.isSuccess) {
|
|
28899
|
+
var _fetchProductsQuery$d, _fetchProductsQuery$d2, _fetchProductsQuery$d3;
|
|
28870
28900
|
var allpagesarr = [];
|
|
28871
|
-
fetchProductsQuery.data.
|
|
28872
|
-
|
|
28873
|
-
allpagesarr.push(productobj);
|
|
28874
|
-
});
|
|
28901
|
+
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) {
|
|
28902
|
+
allpagesarr.push(item);
|
|
28875
28903
|
});
|
|
28876
28904
|
cardobjassigner(allpagesarr);
|
|
28877
28905
|
}
|
|
@@ -28903,11 +28931,10 @@ var CardsSection2 = function CardsSection2(props) {
|
|
|
28903
28931
|
React.useEffect(function () {
|
|
28904
28932
|
if (fetchingtype == 'products') {
|
|
28905
28933
|
if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
|
|
28934
|
+
var _fetchProductsQuery$d4, _fetchProductsQuery$d5, _fetchProductsQuery$d6;
|
|
28906
28935
|
var allpagesarr = [];
|
|
28907
|
-
fetchProductsQuery.data.
|
|
28908
|
-
|
|
28909
|
-
allpagesarr.push(productobj);
|
|
28910
|
-
});
|
|
28936
|
+
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) {
|
|
28937
|
+
allpagesarr.push(item);
|
|
28911
28938
|
});
|
|
28912
28939
|
cardobjassigner(allpagesarr);
|
|
28913
28940
|
}
|
|
@@ -29262,11 +29289,10 @@ var Sixverticalcardssection = function Sixverticalcardssection(props) {
|
|
|
29262
29289
|
}
|
|
29263
29290
|
} else if (fetchingtype == 'products') {
|
|
29264
29291
|
if (fetchProductsQuery.isSuccess) {
|
|
29292
|
+
var _fetchProductsQuery$d, _fetchProductsQuery$d2, _fetchProductsQuery$d3;
|
|
29265
29293
|
var allpagesarr = [];
|
|
29266
|
-
fetchProductsQuery.data.
|
|
29267
|
-
|
|
29268
|
-
allpagesarr.push(productobj);
|
|
29269
|
-
});
|
|
29294
|
+
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) {
|
|
29295
|
+
allpagesarr.push(item);
|
|
29270
29296
|
});
|
|
29271
29297
|
cardobjassigner(allpagesarr);
|
|
29272
29298
|
}
|
|
@@ -29297,11 +29323,10 @@ var Sixverticalcardssection = function Sixverticalcardssection(props) {
|
|
|
29297
29323
|
React.useEffect(function () {
|
|
29298
29324
|
if (fetchingtype == 'products') {
|
|
29299
29325
|
if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
|
|
29326
|
+
var _fetchProductsQuery$d4, _fetchProductsQuery$d5, _fetchProductsQuery$d6;
|
|
29300
29327
|
var allpagesarr = [];
|
|
29301
|
-
fetchProductsQuery.data.
|
|
29302
|
-
|
|
29303
|
-
allpagesarr.push(productobj);
|
|
29304
|
-
});
|
|
29328
|
+
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) {
|
|
29329
|
+
allpagesarr.push(item);
|
|
29305
29330
|
});
|
|
29306
29331
|
cardobjassigner(allpagesarr);
|
|
29307
29332
|
}
|
|
@@ -29658,222 +29683,6 @@ var ModernCardsSection = function ModernCardsSection(props) {
|
|
|
29658
29683
|
var _useInView = reactIntersectionObserver.useInView(),
|
|
29659
29684
|
ref = _useInView.ref,
|
|
29660
29685
|
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
29686
|
var StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
|
|
29878
29687
|
props.actions.lang;
|
|
29879
29688
|
var langdetect = props.actions.langdetect;
|
|
@@ -29960,11 +29769,10 @@ var ModernCardsSection = function ModernCardsSection(props) {
|
|
|
29960
29769
|
}
|
|
29961
29770
|
} else if (fetchingtype == 'products') {
|
|
29962
29771
|
if (fetchProductsQuery.isSuccess) {
|
|
29772
|
+
var _fetchProductsQuery$d, _fetchProductsQuery$d2, _fetchProductsQuery$d3;
|
|
29963
29773
|
var allpagesarr = [];
|
|
29964
|
-
fetchProductsQuery.data.
|
|
29965
|
-
|
|
29966
|
-
allpagesarr.push(productobj);
|
|
29967
|
-
});
|
|
29774
|
+
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) {
|
|
29775
|
+
allpagesarr.push(item);
|
|
29968
29776
|
});
|
|
29969
29777
|
cardobjassigner(allpagesarr);
|
|
29970
29778
|
}
|
|
@@ -30073,11 +29881,10 @@ var ModernCardsSection = function ModernCardsSection(props) {
|
|
|
30073
29881
|
React.useEffect(function () {
|
|
30074
29882
|
if (fetchingtype == 'products') {
|
|
30075
29883
|
if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
|
|
29884
|
+
var _fetchProductsQuery$d4, _fetchProductsQuery$d5, _fetchProductsQuery$d6;
|
|
30076
29885
|
var allpagesarr = [];
|
|
30077
|
-
fetchProductsQuery.data.
|
|
30078
|
-
|
|
30079
|
-
allpagesarr.push(productobj);
|
|
30080
|
-
});
|
|
29886
|
+
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) {
|
|
29887
|
+
allpagesarr.push(item);
|
|
30081
29888
|
});
|
|
30082
29889
|
cardobjassigner(allpagesarr);
|
|
30083
29890
|
}
|
|
@@ -31411,11 +31218,10 @@ var CardsSectionwithfilter = function CardsSectionwithfilter(props) {
|
|
|
31411
31218
|
}
|
|
31412
31219
|
// } else if (fetchingtype == 'products') {
|
|
31413
31220
|
if (fetchProductsQuery.isSuccess) {
|
|
31221
|
+
var _fetchProductsQuery$d, _fetchProductsQuery$d2, _fetchProductsQuery$d3;
|
|
31414
31222
|
var allpagesarr = [];
|
|
31415
|
-
fetchProductsQuery.data.
|
|
31416
|
-
|
|
31417
|
-
allpagesarr.push(productobj);
|
|
31418
|
-
});
|
|
31223
|
+
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) {
|
|
31224
|
+
allpagesarr.push(item);
|
|
31419
31225
|
});
|
|
31420
31226
|
productcardobjassigner(allpagesarr);
|
|
31421
31227
|
}
|
|
@@ -31446,11 +31252,10 @@ var CardsSectionwithfilter = function CardsSectionwithfilter(props) {
|
|
|
31446
31252
|
React.useEffect(function () {
|
|
31447
31253
|
// if (fetchingtype == 'products') {
|
|
31448
31254
|
if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
|
|
31255
|
+
var _fetchProductsQuery$d4, _fetchProductsQuery$d5, _fetchProductsQuery$d6;
|
|
31449
31256
|
var allpagesarr = [];
|
|
31450
|
-
fetchProductsQuery.data.
|
|
31451
|
-
|
|
31452
|
-
allpagesarr.push(productobj);
|
|
31453
|
-
});
|
|
31257
|
+
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) {
|
|
31258
|
+
allpagesarr.push(item);
|
|
31454
31259
|
});
|
|
31455
31260
|
productcardobjassigner(allpagesarr);
|
|
31456
31261
|
}
|
|
@@ -31872,16 +31677,6 @@ var CardsSectionwithfilter = function CardsSectionwithfilter(props) {
|
|
|
31872
31677
|
},
|
|
31873
31678
|
onClick: function onClick() {
|
|
31874
31679
|
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
31680
|
}
|
|
31886
31681
|
}, /*#__PURE__*/React__default["default"].createElement("p", null, item.name));
|
|
31887
31682
|
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|