tabexseriescomponents 0.0.413 → 0.0.414
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 +181 -139
- package/dist/index.esm.js +181 -139
- package/dist/index.umd.js +181 -139
- package/package.json +1 -1
- package/src 2.zip +0 -0
- package/srcbeforeedits.zip +0 -0
package/dist/index.cjs.js
CHANGED
|
@@ -13395,15 +13395,18 @@ var Select$1 = /*#__PURE__*/React__default["default"].lazy(function () {
|
|
|
13395
13395
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-select')); });
|
|
13396
13396
|
});
|
|
13397
13397
|
var Filter$1 = function Filter(props) {
|
|
13398
|
-
var
|
|
13398
|
+
var _css;
|
|
13399
13399
|
var lang = props.actions.lang;
|
|
13400
13400
|
var langdetect = props.actions.langdetect;
|
|
13401
13401
|
props.actions.productfiltercontext;
|
|
13402
13402
|
props.actions.setproductfiltercontext;
|
|
13403
13403
|
var ProductFilterObjContext = props.actions.ProductFilterObjContext;
|
|
13404
13404
|
var setProductFilterObjContext = props.actions.setProductFilterObjContext;
|
|
13405
|
-
|
|
13405
|
+
props.actions.authdetailsContext;
|
|
13406
|
+
var fetchproductoptionsQueryContext = props.actions.fetchproductoptionsQueryContext;
|
|
13407
|
+
var fetchCategoriesQueryContext = props.actions.fetchCategoriesQueryContext;
|
|
13406
13408
|
var routingcountext = props.actions.routingcountext;
|
|
13409
|
+
var fetchcollectionsQueryContext = props.actions.fetchcollectionsQueryContext;
|
|
13407
13410
|
var StaticPagesLinksContext = props.actions.StaticPagesLinksContext;
|
|
13408
13411
|
var ikimagecredcontext = props.actions.ikimagecredcontext;
|
|
13409
13412
|
var _useState = React.useState({
|
|
@@ -13429,7 +13432,8 @@ var Filter$1 = function Filter(props) {
|
|
|
13429
13432
|
_useState6 = _slicedToArray__default["default"](_useState5, 2),
|
|
13430
13433
|
sectionproperties = _useState6[0],
|
|
13431
13434
|
setsectionproperties = _useState6[1];
|
|
13432
|
-
|
|
13435
|
+
// const [instfilters, setinstfilters] = useState([...authdetailsContext.instinfo.instfilters]);
|
|
13436
|
+
var _useState7 = React.useState([]),
|
|
13433
13437
|
_useState8 = _slicedToArray__default["default"](_useState7, 2),
|
|
13434
13438
|
instfilters = _useState8[0],
|
|
13435
13439
|
setinstfilters = _useState8[1];
|
|
@@ -13437,11 +13441,11 @@ var Filter$1 = function Filter(props) {
|
|
|
13437
13441
|
_useState10 = _slicedToArray__default["default"](_useState9, 2),
|
|
13438
13442
|
collectionstobevisible = _useState10[0],
|
|
13439
13443
|
setcollectionstobevisible = _useState10[1];
|
|
13440
|
-
var _useState11 = React.useState(
|
|
13444
|
+
var _useState11 = React.useState([]),
|
|
13441
13445
|
_useState12 = _slicedToArray__default["default"](_useState11, 2),
|
|
13442
13446
|
instcollections = _useState12[0],
|
|
13443
13447
|
setinstcollections = _useState12[1];
|
|
13444
|
-
var _useState13 = React.useState(
|
|
13448
|
+
var _useState13 = React.useState([]),
|
|
13445
13449
|
_useState14 = _slicedToArray__default["default"](_useState13, 2),
|
|
13446
13450
|
instcategories = _useState14[0],
|
|
13447
13451
|
setinstcategories = _useState14[1];
|
|
@@ -13490,11 +13494,28 @@ var Filter$1 = function Filter(props) {
|
|
|
13490
13494
|
filterupdater();
|
|
13491
13495
|
}, []);
|
|
13492
13496
|
React.useEffect(function () {
|
|
13493
|
-
|
|
13494
|
-
|
|
13495
|
-
|
|
13496
|
-
|
|
13497
|
-
}, [
|
|
13497
|
+
if (fetchproductoptionsQueryContext.isSuccess) {
|
|
13498
|
+
var _fetchproductoptionsQ;
|
|
13499
|
+
setinstfilters(_toConsumableArray__default["default"](fetchproductoptionsQueryContext === null || fetchproductoptionsQueryContext === void 0 || (_fetchproductoptionsQ = fetchproductoptionsQueryContext.data) === null || _fetchproductoptionsQ === void 0 || (_fetchproductoptionsQ = _fetchproductoptionsQ.data) === null || _fetchproductoptionsQ === void 0 ? void 0 : _fetchproductoptionsQ.productoptions));
|
|
13500
|
+
}
|
|
13501
|
+
}, [fetchproductoptionsQueryContext.isSuccess]);
|
|
13502
|
+
React.useEffect(function () {
|
|
13503
|
+
if (fetchCategoriesQueryContext.isSuccess) {
|
|
13504
|
+
var _fetchCategoriesQuery;
|
|
13505
|
+
setinstcategories(_toConsumableArray__default["default"](fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 || (_fetchCategoriesQuery = fetchCategoriesQueryContext.data) === null || _fetchCategoriesQuery === void 0 || (_fetchCategoriesQuery = _fetchCategoriesQuery.data) === null || _fetchCategoriesQuery === void 0 ? void 0 : _fetchCategoriesQuery.categories));
|
|
13506
|
+
}
|
|
13507
|
+
}, [fetchCategoriesQueryContext.isSuccess]);
|
|
13508
|
+
React.useEffect(function () {
|
|
13509
|
+
if (fetchcollectionsQueryContext.isSuccess) {
|
|
13510
|
+
var _fetchcollectionsQuer;
|
|
13511
|
+
setinstcollections(_toConsumableArray__default["default"](fetchcollectionsQueryContext === null || fetchcollectionsQueryContext === void 0 || (_fetchcollectionsQuer = fetchcollectionsQueryContext.data) === null || _fetchcollectionsQuer === void 0 || (_fetchcollectionsQuer = _fetchcollectionsQuer.data) === null || _fetchcollectionsQuer === void 0 ? void 0 : _fetchcollectionsQuer.collections));
|
|
13512
|
+
}
|
|
13513
|
+
}, [fetchcollectionsQueryContext.isSuccess]);
|
|
13514
|
+
// useEffect(() => {
|
|
13515
|
+
// // setinstfilters([...authdetailsContext.instinfo.instfilters]);
|
|
13516
|
+
// // setinstcollections([...authdetailsContext.instinfo.instcollections]);
|
|
13517
|
+
// // setinstcategories([...authdetailsContext?.instinfo?.instcategories]);
|
|
13518
|
+
// }, [authdetailsContext]);
|
|
13498
13519
|
React.useEffect(function () {
|
|
13499
13520
|
if (props.sectionpropertiesprops != undefined && props.sectionpropertiesprops.length != 0) {
|
|
13500
13521
|
setsectionproperties(props.sectionpropertiesprops);
|
|
@@ -13519,69 +13540,73 @@ var Filter$1 = function Filter(props) {
|
|
|
13519
13540
|
}, 500);
|
|
13520
13541
|
}, [raterangevalue]);
|
|
13521
13542
|
React.useEffect(function () {
|
|
13522
|
-
if (
|
|
13523
|
-
if ((
|
|
13524
|
-
|
|
13525
|
-
|
|
13526
|
-
|
|
13527
|
-
|
|
13528
|
-
|
|
13529
|
-
|
|
13530
|
-
|
|
13531
|
-
|
|
13532
|
-
|
|
13533
|
-
|
|
13534
|
-
|
|
13535
|
-
|
|
13536
|
-
|
|
13537
|
-
});
|
|
13538
|
-
}
|
|
13539
|
-
});
|
|
13540
|
-
});
|
|
13541
|
-
} else {
|
|
13542
|
-
instcategories === null || instcategories === void 0 || instcategories.forEach(function (catitem, catindex) {
|
|
13543
|
-
var _catitem$parentcollet2;
|
|
13544
|
-
catitem === null || catitem === void 0 || (_catitem$parentcollet2 = catitem.parentcolletions) === null || _catitem$parentcollet2 === void 0 || _catitem$parentcollet2.forEach(function (parentcolitem, parentcolindex) {
|
|
13545
|
-
var _parentcolitem$collec;
|
|
13546
|
-
parentcolitem === null || parentcolitem === void 0 || (_parentcolitem$collec = parentcolitem.collections) === null || _parentcolitem$collec === void 0 || _parentcolitem$collec.forEach(function (colitem, colindex) {
|
|
13547
|
-
var _ProductFilterObjCont2;
|
|
13548
|
-
ProductFilterObjContext === null || ProductFilterObjContext === void 0 || (_ProductFilterObjCont2 = ProductFilterObjContext.collections) === null || _ProductFilterObjCont2 === void 0 || _ProductFilterObjCont2.forEach(function (colitem2, colindex2) {
|
|
13549
|
-
if (colitem.collectionid == colitem2) {
|
|
13543
|
+
if (fetchCategoriesQueryContext.isSuccess && fetchcollectionsQueryContext.isSuccess) {
|
|
13544
|
+
if ((sectionproperties === null || sectionproperties === void 0 ? void 0 : sectionproperties.filterretreivetype) == 'Depend on chosen parent group') {
|
|
13545
|
+
if ((ProductFilterObjContext === null || ProductFilterObjContext === void 0 ? void 0 : ProductFilterObjContext.collections) != undefined && (ProductFilterObjContext === null || ProductFilterObjContext === void 0 ? void 0 : ProductFilterObjContext.collections) != null && Array.isArray(ProductFilterObjContext === null || ProductFilterObjContext === void 0 ? void 0 : ProductFilterObjContext.collections)) {
|
|
13546
|
+
var _parentidsfound;
|
|
13547
|
+
var collectiontobevisible = [];
|
|
13548
|
+
var parentidsfound = [];
|
|
13549
|
+
if (ProductFilterObjContext.ProductFetchingType == 'Parent Collection') {
|
|
13550
|
+
parentidsfound = ProductFilterObjContext === null || ProductFilterObjContext === void 0 ? void 0 : ProductFilterObjContext.collections;
|
|
13551
|
+
} else if (ProductFilterObjContext.ProductFetchingType == 'Category') {
|
|
13552
|
+
instcategories === null || instcategories === void 0 || instcategories.forEach(function (catitem, catindex) {
|
|
13553
|
+
var _ProductFilterObjCont;
|
|
13554
|
+
ProductFilterObjContext === null || ProductFilterObjContext === void 0 || (_ProductFilterObjCont = ProductFilterObjContext.collections) === null || _ProductFilterObjCont === void 0 || _ProductFilterObjCont.forEach(function (colitem2, colindex2) {
|
|
13555
|
+
if (catitem.categoryid == colitem2) {
|
|
13556
|
+
var _catitem$parentcollet;
|
|
13557
|
+
catitem === null || catitem === void 0 || (_catitem$parentcollet = catitem.parentcolletions) === null || _catitem$parentcollet === void 0 || _catitem$parentcollet.forEach(function (parentcolitem, parentcolindex) {
|
|
13550
13558
|
parentidsfound.push(parentcolitem.parentcollectionid);
|
|
13551
|
-
}
|
|
13559
|
+
});
|
|
13560
|
+
}
|
|
13561
|
+
});
|
|
13562
|
+
});
|
|
13563
|
+
} else {
|
|
13564
|
+
instcategories === null || instcategories === void 0 || instcategories.forEach(function (catitem, catindex) {
|
|
13565
|
+
var _catitem$parentcollet2;
|
|
13566
|
+
catitem === null || catitem === void 0 || (_catitem$parentcollet2 = catitem.parentcolletions) === null || _catitem$parentcollet2 === void 0 || _catitem$parentcollet2.forEach(function (parentcolitem, parentcolindex) {
|
|
13567
|
+
var _parentcolitem$collec;
|
|
13568
|
+
parentcolitem === null || parentcolitem === void 0 || (_parentcolitem$collec = parentcolitem.collections) === null || _parentcolitem$collec === void 0 || _parentcolitem$collec.forEach(function (colitem, colindex) {
|
|
13569
|
+
var _ProductFilterObjCont2;
|
|
13570
|
+
ProductFilterObjContext === null || ProductFilterObjContext === void 0 || (_ProductFilterObjCont2 = ProductFilterObjContext.collections) === null || _ProductFilterObjCont2 === void 0 || _ProductFilterObjCont2.forEach(function (colitem2, colindex2) {
|
|
13571
|
+
if (colitem.collectionid == colitem2) {
|
|
13572
|
+
parentidsfound.push(parentcolitem.parentcollectionid);
|
|
13573
|
+
}
|
|
13574
|
+
});
|
|
13552
13575
|
});
|
|
13553
13576
|
});
|
|
13554
13577
|
});
|
|
13578
|
+
}
|
|
13579
|
+
parentidsfound = parentidsfound.filter(function (val, id, array) {
|
|
13580
|
+
return array.indexOf(val) == id;
|
|
13555
13581
|
});
|
|
13556
|
-
|
|
13557
|
-
|
|
13558
|
-
|
|
13559
|
-
|
|
13560
|
-
|
|
13561
|
-
|
|
13562
|
-
|
|
13563
|
-
|
|
13564
|
-
|
|
13565
|
-
|
|
13566
|
-
|
|
13567
|
-
|
|
13568
|
-
|
|
13569
|
-
|
|
13570
|
-
|
|
13571
|
-
if (
|
|
13572
|
-
|
|
13582
|
+
if (((_parentidsfound = parentidsfound) === null || _parentidsfound === void 0 ? void 0 : _parentidsfound.length) != 0) {
|
|
13583
|
+
instcategories === null || instcategories === void 0 || instcategories.forEach(function (catitem, catindex) {
|
|
13584
|
+
var _catitem$parentcollet3;
|
|
13585
|
+
catitem === null || catitem === void 0 || (_catitem$parentcollet3 = catitem.parentcolletions) === null || _catitem$parentcollet3 === void 0 || _catitem$parentcollet3.forEach(function (parentcolitem, parentcolindex) {
|
|
13586
|
+
var _parentidsfound2;
|
|
13587
|
+
(_parentidsfound2 = parentidsfound) === null || _parentidsfound2 === void 0 || _parentidsfound2.forEach(function (parentidfounditem, parentidfoundindex) {
|
|
13588
|
+
if (parentidfounditem == (parentcolitem === null || parentcolitem === void 0 ? void 0 : parentcolitem.parentcollectionid)) {
|
|
13589
|
+
var _parentcolitem$collec2;
|
|
13590
|
+
parentcolitem === null || parentcolitem === void 0 || (_parentcolitem$collec2 = parentcolitem.collections) === null || _parentcolitem$collec2 === void 0 || _parentcolitem$collec2.forEach(function (colitem, colindex) {
|
|
13591
|
+
var iscolexists = false;
|
|
13592
|
+
collectiontobevisible === null || collectiontobevisible === void 0 || collectiontobevisible.forEach(function (colitemex, colindexex) {
|
|
13593
|
+
if (colitemex.collectionid == colitem.collectionid) {
|
|
13594
|
+
iscolexists = true;
|
|
13595
|
+
}
|
|
13596
|
+
});
|
|
13597
|
+
if (iscolexists == false) {
|
|
13598
|
+
collectiontobevisible.push(colitem);
|
|
13573
13599
|
}
|
|
13574
13600
|
});
|
|
13575
|
-
|
|
13576
|
-
|
|
13577
|
-
}
|
|
13578
|
-
});
|
|
13579
|
-
}
|
|
13601
|
+
}
|
|
13602
|
+
});
|
|
13580
13603
|
});
|
|
13581
13604
|
});
|
|
13582
|
-
|
|
13583
|
-
|
|
13584
|
-
|
|
13605
|
+
if ((collectiontobevisible === null || collectiontobevisible === void 0 ? void 0 : collectiontobevisible.length) != 0) {
|
|
13606
|
+
setcollectionstobevisible(collectiontobevisible);
|
|
13607
|
+
} else {
|
|
13608
|
+
setcollectionstobevisible(instcollections);
|
|
13609
|
+
}
|
|
13585
13610
|
} else {
|
|
13586
13611
|
setcollectionstobevisible(instcollections);
|
|
13587
13612
|
}
|
|
@@ -13591,10 +13616,8 @@ var Filter$1 = function Filter(props) {
|
|
|
13591
13616
|
} else {
|
|
13592
13617
|
setcollectionstobevisible(instcollections);
|
|
13593
13618
|
}
|
|
13594
|
-
} else {
|
|
13595
|
-
setcollectionstobevisible(instcollections);
|
|
13596
13619
|
}
|
|
13597
|
-
}, [ProductFilterObjContext]);
|
|
13620
|
+
}, [ProductFilterObjContext, fetchCategoriesQueryContext.isSuccess, fetchcollectionsQueryContext.isSuccess, instcategories, instcollections]);
|
|
13598
13621
|
React.useEffect(function () {
|
|
13599
13622
|
if (productfeatuesarr.length != 0) {
|
|
13600
13623
|
var tempfetchproductsfilerobjcontext = _objectSpread$28({}, ProductFilterObjContext);
|
|
@@ -13801,7 +13824,7 @@ var Filter$1 = function Filter(props) {
|
|
|
13801
13824
|
}))))));
|
|
13802
13825
|
};
|
|
13803
13826
|
var AccordionOuter = function AccordionOuter(categoryItem, categoryIndex) {
|
|
13804
|
-
var
|
|
13827
|
+
var _instcategories$categ;
|
|
13805
13828
|
return /*#__PURE__*/React__default["default"].createElement(reactAccessibleAccordion.AccordionItem, {
|
|
13806
13829
|
uuid: categoryIndex
|
|
13807
13830
|
}, /*#__PURE__*/React__default["default"].createElement(reactAccessibleAccordion.AccordionItemHeading, null, /*#__PURE__*/React__default["default"].createElement(reactAccessibleAccordion.AccordionItemButton, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -13840,7 +13863,7 @@ var Filter$1 = function Filter(props) {
|
|
|
13840
13863
|
onClick: function onClick() {
|
|
13841
13864
|
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, 'categories/' + categoryItem.categoryid);
|
|
13842
13865
|
}
|
|
13843
|
-
}, langdetect == 'en' ? sectionproperties.explorebtncontenten : sectionproperties.explorebtncontentar, ' ', langdetect == 'en' ? categoryItem.title_en : categoryItem.title_ar)),
|
|
13866
|
+
}, langdetect == 'en' ? sectionproperties.explorebtncontenten : sectionproperties.explorebtncontentar, ' ', langdetect == 'en' ? categoryItem.title_en : categoryItem.title_ar)), (_instcategories$categ = instcategories[categoryIndex]) === null || _instcategories$categ === void 0 ? void 0 : _instcategories$categ.parentcolletions.map(function (parentcollectionitem, parentcollectionindex) {
|
|
13844
13867
|
if (parentcollectionitem.isinftiler == 1) {
|
|
13845
13868
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
13846
13869
|
"class": "col-lg-12"
|
|
@@ -15178,6 +15201,7 @@ var CardsSection = function CardsSection(props) {
|
|
|
15178
15201
|
var fetchingtype = props.actions.fetchingtype;
|
|
15179
15202
|
props.actions.addtofavoritescontext;
|
|
15180
15203
|
var fetchAuthorizationQueryContext = props.actions.fetchAuthorizationQueryContext;
|
|
15204
|
+
var fetchCategoriesQueryContext = props.actions.fetchCategoriesQueryContext;
|
|
15181
15205
|
var FetchVendorsQuery = props.actions.FetchVendorsQuery;
|
|
15182
15206
|
props.actions.ikimagecredcontext;
|
|
15183
15207
|
props.actions.sortbycontext;
|
|
@@ -15314,47 +15338,49 @@ var CardsSection = function CardsSection(props) {
|
|
|
15314
15338
|
tempfetchproductsfilerobjcontext.grouptyperefid = ProductsFetchingTypeSectionObj.grouptyperefid;
|
|
15315
15339
|
setProductFilterObjContext(_objectSpread$26({}, tempfetchproductsfilerobjcontext));
|
|
15316
15340
|
}
|
|
15341
|
+
setFetchQueriesEngineContext(_objectSpread$26({}, tempFetchQueriesEngineContext));
|
|
15342
|
+
}
|
|
15343
|
+
}, [fetchingtype, ProductsFetchingTypeSectionObj]);
|
|
15344
|
+
React.useEffect(function () {
|
|
15345
|
+
if ((fetchingtype === null || fetchingtype === void 0 ? void 0 : fetchingtype.length) != 0) {
|
|
15317
15346
|
if (fetchingtype == 'categories') {
|
|
15318
|
-
|
|
15319
|
-
|
|
15320
|
-
|
|
15347
|
+
var categories = [];
|
|
15348
|
+
if (fetchCategoriesQueryContext !== null && fetchCategoriesQueryContext !== void 0 && fetchCategoriesQueryContext.isSuccess) {
|
|
15349
|
+
var _fetchCategoriesQuery;
|
|
15350
|
+
categories = fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 || (_fetchCategoriesQuery = fetchCategoriesQueryContext.data) === null || _fetchCategoriesQuery === void 0 || (_fetchCategoriesQuery = _fetchCategoriesQuery.data) === null || _fetchCategoriesQuery === void 0 ? void 0 : _fetchCategoriesQuery.categories;
|
|
15321
15351
|
}
|
|
15352
|
+
cardobjassigner(categories);
|
|
15322
15353
|
}
|
|
15323
15354
|
if (fetchingtype == 'parentcollections' || fetchingtype == 'innercategories') {
|
|
15324
|
-
|
|
15325
|
-
|
|
15326
|
-
|
|
15327
|
-
|
|
15328
|
-
|
|
15329
|
-
|
|
15330
|
-
|
|
15331
|
-
|
|
15332
|
-
|
|
15333
|
-
|
|
15355
|
+
var _categories;
|
|
15356
|
+
var categories = [];
|
|
15357
|
+
if (fetchCategoriesQueryContext !== null && fetchCategoriesQueryContext !== void 0 && fetchCategoriesQueryContext.isSuccess) {
|
|
15358
|
+
var _fetchCategoriesQuery2;
|
|
15359
|
+
categories = fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 || (_fetchCategoriesQuery2 = fetchCategoriesQueryContext.data) === null || _fetchCategoriesQuery2 === void 0 || (_fetchCategoriesQuery2 = _fetchCategoriesQuery2.data) === null || _fetchCategoriesQuery2 === void 0 ? void 0 : _fetchCategoriesQuery2.categories;
|
|
15360
|
+
}
|
|
15361
|
+
// if (fetchAuthorizationQueryContext?.isSuccess) {
|
|
15362
|
+
// var categories = fetchAuthorizationQueryContext.data.data.instinfo.instcategories;
|
|
15363
|
+
// alert(JSON.stringify(categories));
|
|
15364
|
+
var parentcollections = [];
|
|
15365
|
+
(_categories = categories) === null || _categories === void 0 || _categories.forEach(function (catitem, catindex) {
|
|
15366
|
+
catitem === null || catitem === void 0 || catitem.parentcolletions.forEach(function (parentcolitem) {
|
|
15367
|
+
if (parentcolitem.isshowntocustomers == 1) {
|
|
15368
|
+
parentcolitem.categoryid = catitem.categoryid;
|
|
15369
|
+
parentcollections.push(parentcolitem);
|
|
15370
|
+
}
|
|
15371
|
+
});
|
|
15372
|
+
});
|
|
15373
|
+
if (fetchingtype == 'parentcollections') {
|
|
15374
|
+
if ((sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid) != null && (sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid) != undefined && (sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid) != 'all') {
|
|
15375
|
+
var arrafterfilter = [];
|
|
15376
|
+
parentcollections.forEach(function (parentcolitem, parcolindex) {
|
|
15377
|
+
if (parentcolitem.categoryid == (sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid)) {
|
|
15378
|
+
arrafterfilter.push(parentcolitem);
|
|
15334
15379
|
}
|
|
15335
15380
|
});
|
|
15336
|
-
|
|
15337
|
-
if (fetchingtype == 'parentcollections') {
|
|
15338
|
-
if ((sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid) != null && (sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid) != undefined && (sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid) != 'all') {
|
|
15339
|
-
var arrafterfilter = [];
|
|
15340
|
-
parentcollections.forEach(function (parentcolitem, parcolindex) {
|
|
15341
|
-
if (parentcolitem.categoryid == (sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid)) {
|
|
15342
|
-
arrafterfilter.push(parentcolitem);
|
|
15343
|
-
}
|
|
15344
|
-
});
|
|
15345
|
-
parentcollections = arrafterfilter;
|
|
15346
|
-
}
|
|
15347
|
-
if (props.collectionidprops != null && props.collectionidprops != undefined && props.collectionidprops != 'all') {
|
|
15348
|
-
var arrafterfilter = [];
|
|
15349
|
-
parentcollections.forEach(function (parentcolitem, parcolindex) {
|
|
15350
|
-
if (parentcolitem.categoryid == props.collectionidprops) {
|
|
15351
|
-
arrafterfilter.push(parentcolitem);
|
|
15352
|
-
}
|
|
15353
|
-
});
|
|
15354
|
-
parentcollections = arrafterfilter;
|
|
15355
|
-
}
|
|
15381
|
+
parentcollections = arrafterfilter;
|
|
15356
15382
|
}
|
|
15357
|
-
if (
|
|
15383
|
+
if (props.collectionidprops != null && props.collectionidprops != undefined && props.collectionidprops != 'all') {
|
|
15358
15384
|
var arrafterfilter = [];
|
|
15359
15385
|
parentcollections.forEach(function (parentcolitem, parcolindex) {
|
|
15360
15386
|
if (parentcolitem.categoryid == props.collectionidprops) {
|
|
@@ -15363,48 +15389,62 @@ var CardsSection = function CardsSection(props) {
|
|
|
15363
15389
|
});
|
|
15364
15390
|
parentcollections = arrafterfilter;
|
|
15365
15391
|
}
|
|
15366
|
-
cardobjassigner(parentcollections);
|
|
15367
15392
|
}
|
|
15393
|
+
if (fetchingtype == 'innercategories') {
|
|
15394
|
+
var arrafterfilter = [];
|
|
15395
|
+
parentcollections.forEach(function (parentcolitem, parcolindex) {
|
|
15396
|
+
if (parentcolitem.categoryid == props.collectionidprops) {
|
|
15397
|
+
arrafterfilter.push(parentcolitem);
|
|
15398
|
+
}
|
|
15399
|
+
});
|
|
15400
|
+
parentcollections = arrafterfilter;
|
|
15401
|
+
}
|
|
15402
|
+
cardobjassigner(parentcollections);
|
|
15403
|
+
// }
|
|
15368
15404
|
} else if (fetchingtype == 'innerparentcollections') {
|
|
15369
|
-
|
|
15370
|
-
|
|
15371
|
-
|
|
15372
|
-
var
|
|
15373
|
-
(
|
|
15374
|
-
|
|
15375
|
-
|
|
15376
|
-
|
|
15377
|
-
|
|
15378
|
-
|
|
15379
|
-
|
|
15380
|
-
|
|
15381
|
-
|
|
15382
|
-
|
|
15405
|
+
var _categories2;
|
|
15406
|
+
var categories = [];
|
|
15407
|
+
if (fetchCategoriesQueryContext !== null && fetchCategoriesQueryContext !== void 0 && fetchCategoriesQueryContext.isSuccess) {
|
|
15408
|
+
var _fetchCategoriesQuery3;
|
|
15409
|
+
categories = fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 || (_fetchCategoriesQuery3 = fetchCategoriesQueryContext.data) === null || _fetchCategoriesQuery3 === void 0 || (_fetchCategoriesQuery3 = _fetchCategoriesQuery3.data) === null || _fetchCategoriesQuery3 === void 0 ? void 0 : _fetchCategoriesQuery3.categories;
|
|
15410
|
+
}
|
|
15411
|
+
// if (fetchAuthorizationQueryContext?.isSuccess) {
|
|
15412
|
+
// var categories = fetchAuthorizationQueryContext.data.data.instinfo.instcategories;
|
|
15413
|
+
var collections = [];
|
|
15414
|
+
(_categories2 = categories) === null || _categories2 === void 0 || _categories2.forEach(function (catitem, catindex) {
|
|
15415
|
+
catitem === null || catitem === void 0 || catitem.parentcolletions.forEach(function (parentcolitem) {
|
|
15416
|
+
var _parentcolitem$collec;
|
|
15417
|
+
parentcolitem.categoryid = catitem.categoryid;
|
|
15418
|
+
parentcolitem === null || parentcolitem === void 0 || (_parentcolitem$collec = parentcolitem.collections) === null || _parentcolitem$collec === void 0 || _parentcolitem$collec.forEach(function (collitem, colindex) {
|
|
15419
|
+
if (collitem.isshowntocustomers == 1) {
|
|
15420
|
+
collitem.parentcollectionid = parentcolitem.parentcollectionid;
|
|
15421
|
+
collections.push(collitem);
|
|
15422
|
+
}
|
|
15383
15423
|
});
|
|
15384
15424
|
});
|
|
15385
|
-
|
|
15386
|
-
|
|
15387
|
-
|
|
15388
|
-
|
|
15389
|
-
|
|
15390
|
-
|
|
15391
|
-
|
|
15392
|
-
|
|
15393
|
-
|
|
15394
|
-
});
|
|
15395
|
-
if (iscollexists == false) {
|
|
15396
|
-
collectionsafterfilter.push(colitem);
|
|
15425
|
+
});
|
|
15426
|
+
if (fetchingtype == 'innerparentcollections') {
|
|
15427
|
+
var collectionsafterfilter = [];
|
|
15428
|
+
collections.forEach(function (colitem, colindex) {
|
|
15429
|
+
if (colitem.parentcollectionid == props.collectionidprops) {
|
|
15430
|
+
var iscollexists = false;
|
|
15431
|
+
collectionsafterfilter.forEach(function (existcolitem) {
|
|
15432
|
+
if (colitem.collectionid == existcolitem.collectionid) {
|
|
15433
|
+
iscollexists = true;
|
|
15397
15434
|
}
|
|
15435
|
+
});
|
|
15436
|
+
if (iscollexists == false) {
|
|
15437
|
+
collectionsafterfilter.push(colitem);
|
|
15398
15438
|
}
|
|
15399
|
-
}
|
|
15400
|
-
|
|
15401
|
-
|
|
15402
|
-
cardobjassigner(collections);
|
|
15439
|
+
}
|
|
15440
|
+
});
|
|
15441
|
+
collections = collectionsafterfilter;
|
|
15403
15442
|
}
|
|
15443
|
+
cardobjassigner(collections);
|
|
15444
|
+
// }
|
|
15404
15445
|
}
|
|
15405
|
-
setFetchQueriesEngineContext(_objectSpread$26({}, tempFetchQueriesEngineContext));
|
|
15406
15446
|
}
|
|
15407
|
-
}, [fetchingtype, ProductsFetchingTypeSectionObj]);
|
|
15447
|
+
}, [fetchingtype, ProductsFetchingTypeSectionObj, fetchCategoriesQueryContext.isSuccess]);
|
|
15408
15448
|
React.useEffect(function () {
|
|
15409
15449
|
if (fetchingtype == 'products') {
|
|
15410
15450
|
if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
|
|
@@ -15523,9 +15563,11 @@ var CardsSection = function CardsSection(props) {
|
|
|
15523
15563
|
cardobj.productcanrate = arrayItem.productinfo.productcanrate;
|
|
15524
15564
|
cardobj.sku = arrayItem.productinfo.sku;
|
|
15525
15565
|
if (langdetect == 'en') {
|
|
15526
|
-
|
|
15566
|
+
var _fetchAuthorizationQu;
|
|
15567
|
+
cardobj.currencyname = fetchAuthorizationQueryContext === null || fetchAuthorizationQueryContext === void 0 || (_fetchAuthorizationQu = fetchAuthorizationQueryContext.data) === null || _fetchAuthorizationQu === void 0 || (_fetchAuthorizationQu = _fetchAuthorizationQu.data) === null || _fetchAuthorizationQu === void 0 ? void 0 : _fetchAuthorizationQu.currencyname_en;
|
|
15527
15568
|
} else {
|
|
15528
|
-
|
|
15569
|
+
var _fetchAuthorizationQu2;
|
|
15570
|
+
cardobj.currencyname = fetchAuthorizationQueryContext === null || fetchAuthorizationQueryContext === void 0 || (_fetchAuthorizationQu2 = fetchAuthorizationQueryContext.data) === null || _fetchAuthorizationQu2 === void 0 || (_fetchAuthorizationQu2 = _fetchAuthorizationQu2.data) === null || _fetchAuthorizationQu2 === void 0 ? void 0 : _fetchAuthorizationQu2.currencyname_ar;
|
|
15529
15571
|
}
|
|
15530
15572
|
if (favoriteprojectscountContext != undefined && favoriteprojectscountContext.length != 0) {
|
|
15531
15573
|
favoriteprojectscountContext.forEach(function (favitem, favindex) {
|
|
@@ -15839,7 +15881,7 @@ var CardsSection = function CardsSection(props) {
|
|
|
15839
15881
|
isloading = true;
|
|
15840
15882
|
}
|
|
15841
15883
|
} else {
|
|
15842
|
-
if ((
|
|
15884
|
+
if ((fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 ? void 0 : fetchCategoriesQueryContext.isFetching) == true || (fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 ? void 0 : fetchCategoriesQueryContext.isFetching) == true) {
|
|
15843
15885
|
isloading = true;
|
|
15844
15886
|
}
|
|
15845
15887
|
}
|