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.umd.js CHANGED
@@ -13227,15 +13227,18 @@
13227
13227
  return import('react-select');
13228
13228
  });
13229
13229
  var Filter$1 = function Filter(props) {
13230
- var _authdetailsContext$i, _css;
13230
+ var _css;
13231
13231
  var lang = props.actions.lang;
13232
13232
  var langdetect = props.actions.langdetect;
13233
13233
  props.actions.productfiltercontext;
13234
13234
  props.actions.setproductfiltercontext;
13235
13235
  var ProductFilterObjContext = props.actions.ProductFilterObjContext;
13236
13236
  var setProductFilterObjContext = props.actions.setProductFilterObjContext;
13237
- var authdetailsContext = props.actions.authdetailsContext;
13237
+ props.actions.authdetailsContext;
13238
+ var fetchproductoptionsQueryContext = props.actions.fetchproductoptionsQueryContext;
13239
+ var fetchCategoriesQueryContext = props.actions.fetchCategoriesQueryContext;
13238
13240
  var routingcountext = props.actions.routingcountext;
13241
+ var fetchcollectionsQueryContext = props.actions.fetchcollectionsQueryContext;
13239
13242
  var StaticPagesLinksContext = props.actions.StaticPagesLinksContext;
13240
13243
  var ikimagecredcontext = props.actions.ikimagecredcontext;
13241
13244
  var _useState = React.useState({
@@ -13261,7 +13264,8 @@
13261
13264
  _useState6 = _slicedToArray__default["default"](_useState5, 2),
13262
13265
  sectionproperties = _useState6[0],
13263
13266
  setsectionproperties = _useState6[1];
13264
- var _useState7 = React.useState(_toConsumableArray__default["default"](authdetailsContext.instinfo.instfilters)),
13267
+ // const [instfilters, setinstfilters] = useState([...authdetailsContext.instinfo.instfilters]);
13268
+ var _useState7 = React.useState([]),
13265
13269
  _useState8 = _slicedToArray__default["default"](_useState7, 2),
13266
13270
  instfilters = _useState8[0],
13267
13271
  setinstfilters = _useState8[1];
@@ -13269,11 +13273,11 @@
13269
13273
  _useState10 = _slicedToArray__default["default"](_useState9, 2),
13270
13274
  collectionstobevisible = _useState10[0],
13271
13275
  setcollectionstobevisible = _useState10[1];
13272
- var _useState11 = React.useState(_toConsumableArray__default["default"](authdetailsContext.instinfo.instcollections)),
13276
+ var _useState11 = React.useState([]),
13273
13277
  _useState12 = _slicedToArray__default["default"](_useState11, 2),
13274
13278
  instcollections = _useState12[0],
13275
13279
  setinstcollections = _useState12[1];
13276
- var _useState13 = React.useState(_toConsumableArray__default["default"](authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i = authdetailsContext.instinfo) === null || _authdetailsContext$i === void 0 ? void 0 : _authdetailsContext$i.instcategories)),
13280
+ var _useState13 = React.useState([]),
13277
13281
  _useState14 = _slicedToArray__default["default"](_useState13, 2),
13278
13282
  instcategories = _useState14[0],
13279
13283
  setinstcategories = _useState14[1];
@@ -13322,11 +13326,28 @@
13322
13326
  filterupdater();
13323
13327
  }, []);
13324
13328
  React.useEffect(function () {
13325
- var _authdetailsContext$i2;
13326
- setinstfilters(_toConsumableArray__default["default"](authdetailsContext.instinfo.instfilters));
13327
- setinstcollections(_toConsumableArray__default["default"](authdetailsContext.instinfo.instcollections));
13328
- setinstcategories(_toConsumableArray__default["default"](authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i2 = authdetailsContext.instinfo) === null || _authdetailsContext$i2 === void 0 ? void 0 : _authdetailsContext$i2.instcategories));
13329
- }, [authdetailsContext]);
13329
+ if (fetchproductoptionsQueryContext.isSuccess) {
13330
+ var _fetchproductoptionsQ;
13331
+ 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));
13332
+ }
13333
+ }, [fetchproductoptionsQueryContext.isSuccess]);
13334
+ React.useEffect(function () {
13335
+ if (fetchCategoriesQueryContext.isSuccess) {
13336
+ var _fetchCategoriesQuery;
13337
+ 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));
13338
+ }
13339
+ }, [fetchCategoriesQueryContext.isSuccess]);
13340
+ React.useEffect(function () {
13341
+ if (fetchcollectionsQueryContext.isSuccess) {
13342
+ var _fetchcollectionsQuer;
13343
+ 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));
13344
+ }
13345
+ }, [fetchcollectionsQueryContext.isSuccess]);
13346
+ // useEffect(() => {
13347
+ // // setinstfilters([...authdetailsContext.instinfo.instfilters]);
13348
+ // // setinstcollections([...authdetailsContext.instinfo.instcollections]);
13349
+ // // setinstcategories([...authdetailsContext?.instinfo?.instcategories]);
13350
+ // }, [authdetailsContext]);
13330
13351
  React.useEffect(function () {
13331
13352
  if (props.sectionpropertiesprops != undefined && props.sectionpropertiesprops.length != 0) {
13332
13353
  setsectionproperties(props.sectionpropertiesprops);
@@ -13351,69 +13372,73 @@
13351
13372
  }, 500);
13352
13373
  }, [raterangevalue]);
13353
13374
  React.useEffect(function () {
13354
- if ((sectionproperties === null || sectionproperties === void 0 ? void 0 : sectionproperties.filterretreivetype) == 'Depend on chosen parent group') {
13355
- 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)) {
13356
- var _parentidsfound;
13357
- var collectiontobevisible = [];
13358
- var parentidsfound = [];
13359
- if (ProductFilterObjContext.ProductFetchingType == 'Parent Collection') {
13360
- parentidsfound = ProductFilterObjContext === null || ProductFilterObjContext === void 0 ? void 0 : ProductFilterObjContext.collections;
13361
- } else if (ProductFilterObjContext.ProductFetchingType == 'Category') {
13362
- instcategories === null || instcategories === void 0 || instcategories.forEach(function (catitem, catindex) {
13363
- var _ProductFilterObjCont;
13364
- ProductFilterObjContext === null || ProductFilterObjContext === void 0 || (_ProductFilterObjCont = ProductFilterObjContext.collections) === null || _ProductFilterObjCont === void 0 || _ProductFilterObjCont.forEach(function (colitem2, colindex2) {
13365
- if (catitem.categoryid == colitem2) {
13366
- var _catitem$parentcollet;
13367
- catitem === null || catitem === void 0 || (_catitem$parentcollet = catitem.parentcolletions) === null || _catitem$parentcollet === void 0 || _catitem$parentcollet.forEach(function (parentcolitem, parentcolindex) {
13368
- parentidsfound.push(parentcolitem.parentcollectionid);
13369
- });
13370
- }
13371
- });
13372
- });
13373
- } else {
13374
- instcategories === null || instcategories === void 0 || instcategories.forEach(function (catitem, catindex) {
13375
- var _catitem$parentcollet2;
13376
- catitem === null || catitem === void 0 || (_catitem$parentcollet2 = catitem.parentcolletions) === null || _catitem$parentcollet2 === void 0 || _catitem$parentcollet2.forEach(function (parentcolitem, parentcolindex) {
13377
- var _parentcolitem$collec;
13378
- parentcolitem === null || parentcolitem === void 0 || (_parentcolitem$collec = parentcolitem.collections) === null || _parentcolitem$collec === void 0 || _parentcolitem$collec.forEach(function (colitem, colindex) {
13379
- var _ProductFilterObjCont2;
13380
- ProductFilterObjContext === null || ProductFilterObjContext === void 0 || (_ProductFilterObjCont2 = ProductFilterObjContext.collections) === null || _ProductFilterObjCont2 === void 0 || _ProductFilterObjCont2.forEach(function (colitem2, colindex2) {
13381
- if (colitem.collectionid == colitem2) {
13375
+ if (fetchCategoriesQueryContext.isSuccess && fetchcollectionsQueryContext.isSuccess) {
13376
+ if ((sectionproperties === null || sectionproperties === void 0 ? void 0 : sectionproperties.filterretreivetype) == 'Depend on chosen parent group') {
13377
+ 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)) {
13378
+ var _parentidsfound;
13379
+ var collectiontobevisible = [];
13380
+ var parentidsfound = [];
13381
+ if (ProductFilterObjContext.ProductFetchingType == 'Parent Collection') {
13382
+ parentidsfound = ProductFilterObjContext === null || ProductFilterObjContext === void 0 ? void 0 : ProductFilterObjContext.collections;
13383
+ } else if (ProductFilterObjContext.ProductFetchingType == 'Category') {
13384
+ instcategories === null || instcategories === void 0 || instcategories.forEach(function (catitem, catindex) {
13385
+ var _ProductFilterObjCont;
13386
+ ProductFilterObjContext === null || ProductFilterObjContext === void 0 || (_ProductFilterObjCont = ProductFilterObjContext.collections) === null || _ProductFilterObjCont === void 0 || _ProductFilterObjCont.forEach(function (colitem2, colindex2) {
13387
+ if (catitem.categoryid == colitem2) {
13388
+ var _catitem$parentcollet;
13389
+ catitem === null || catitem === void 0 || (_catitem$parentcollet = catitem.parentcolletions) === null || _catitem$parentcollet === void 0 || _catitem$parentcollet.forEach(function (parentcolitem, parentcolindex) {
13382
13390
  parentidsfound.push(parentcolitem.parentcollectionid);
13383
- }
13391
+ });
13392
+ }
13393
+ });
13394
+ });
13395
+ } else {
13396
+ instcategories === null || instcategories === void 0 || instcategories.forEach(function (catitem, catindex) {
13397
+ var _catitem$parentcollet2;
13398
+ catitem === null || catitem === void 0 || (_catitem$parentcollet2 = catitem.parentcolletions) === null || _catitem$parentcollet2 === void 0 || _catitem$parentcollet2.forEach(function (parentcolitem, parentcolindex) {
13399
+ var _parentcolitem$collec;
13400
+ parentcolitem === null || parentcolitem === void 0 || (_parentcolitem$collec = parentcolitem.collections) === null || _parentcolitem$collec === void 0 || _parentcolitem$collec.forEach(function (colitem, colindex) {
13401
+ var _ProductFilterObjCont2;
13402
+ ProductFilterObjContext === null || ProductFilterObjContext === void 0 || (_ProductFilterObjCont2 = ProductFilterObjContext.collections) === null || _ProductFilterObjCont2 === void 0 || _ProductFilterObjCont2.forEach(function (colitem2, colindex2) {
13403
+ if (colitem.collectionid == colitem2) {
13404
+ parentidsfound.push(parentcolitem.parentcollectionid);
13405
+ }
13406
+ });
13384
13407
  });
13385
13408
  });
13386
13409
  });
13410
+ }
13411
+ parentidsfound = parentidsfound.filter(function (val, id, array) {
13412
+ return array.indexOf(val) == id;
13387
13413
  });
13388
- }
13389
- parentidsfound = parentidsfound.filter(function (val, id, array) {
13390
- return array.indexOf(val) == id;
13391
- });
13392
- if (((_parentidsfound = parentidsfound) === null || _parentidsfound === void 0 ? void 0 : _parentidsfound.length) != 0) {
13393
- instcategories === null || instcategories === void 0 || instcategories.forEach(function (catitem, catindex) {
13394
- var _catitem$parentcollet3;
13395
- catitem === null || catitem === void 0 || (_catitem$parentcollet3 = catitem.parentcolletions) === null || _catitem$parentcollet3 === void 0 || _catitem$parentcollet3.forEach(function (parentcolitem, parentcolindex) {
13396
- var _parentidsfound2;
13397
- (_parentidsfound2 = parentidsfound) === null || _parentidsfound2 === void 0 || _parentidsfound2.forEach(function (parentidfounditem, parentidfoundindex) {
13398
- if (parentidfounditem == (parentcolitem === null || parentcolitem === void 0 ? void 0 : parentcolitem.parentcollectionid)) {
13399
- var _parentcolitem$collec2;
13400
- parentcolitem === null || parentcolitem === void 0 || (_parentcolitem$collec2 = parentcolitem.collections) === null || _parentcolitem$collec2 === void 0 || _parentcolitem$collec2.forEach(function (colitem, colindex) {
13401
- var iscolexists = false;
13402
- collectiontobevisible === null || collectiontobevisible === void 0 || collectiontobevisible.forEach(function (colitemex, colindexex) {
13403
- if (colitemex.collectionid == colitem.collectionid) {
13404
- iscolexists = true;
13414
+ if (((_parentidsfound = parentidsfound) === null || _parentidsfound === void 0 ? void 0 : _parentidsfound.length) != 0) {
13415
+ instcategories === null || instcategories === void 0 || instcategories.forEach(function (catitem, catindex) {
13416
+ var _catitem$parentcollet3;
13417
+ catitem === null || catitem === void 0 || (_catitem$parentcollet3 = catitem.parentcolletions) === null || _catitem$parentcollet3 === void 0 || _catitem$parentcollet3.forEach(function (parentcolitem, parentcolindex) {
13418
+ var _parentidsfound2;
13419
+ (_parentidsfound2 = parentidsfound) === null || _parentidsfound2 === void 0 || _parentidsfound2.forEach(function (parentidfounditem, parentidfoundindex) {
13420
+ if (parentidfounditem == (parentcolitem === null || parentcolitem === void 0 ? void 0 : parentcolitem.parentcollectionid)) {
13421
+ var _parentcolitem$collec2;
13422
+ parentcolitem === null || parentcolitem === void 0 || (_parentcolitem$collec2 = parentcolitem.collections) === null || _parentcolitem$collec2 === void 0 || _parentcolitem$collec2.forEach(function (colitem, colindex) {
13423
+ var iscolexists = false;
13424
+ collectiontobevisible === null || collectiontobevisible === void 0 || collectiontobevisible.forEach(function (colitemex, colindexex) {
13425
+ if (colitemex.collectionid == colitem.collectionid) {
13426
+ iscolexists = true;
13427
+ }
13428
+ });
13429
+ if (iscolexists == false) {
13430
+ collectiontobevisible.push(colitem);
13405
13431
  }
13406
13432
  });
13407
- if (iscolexists == false) {
13408
- collectiontobevisible.push(colitem);
13409
- }
13410
- });
13411
- }
13433
+ }
13434
+ });
13412
13435
  });
13413
13436
  });
13414
- });
13415
- if ((collectiontobevisible === null || collectiontobevisible === void 0 ? void 0 : collectiontobevisible.length) != 0) {
13416
- setcollectionstobevisible(collectiontobevisible);
13437
+ if ((collectiontobevisible === null || collectiontobevisible === void 0 ? void 0 : collectiontobevisible.length) != 0) {
13438
+ setcollectionstobevisible(collectiontobevisible);
13439
+ } else {
13440
+ setcollectionstobevisible(instcollections);
13441
+ }
13417
13442
  } else {
13418
13443
  setcollectionstobevisible(instcollections);
13419
13444
  }
@@ -13423,10 +13448,8 @@
13423
13448
  } else {
13424
13449
  setcollectionstobevisible(instcollections);
13425
13450
  }
13426
- } else {
13427
- setcollectionstobevisible(instcollections);
13428
13451
  }
13429
- }, [ProductFilterObjContext]);
13452
+ }, [ProductFilterObjContext, fetchCategoriesQueryContext.isSuccess, fetchcollectionsQueryContext.isSuccess, instcategories, instcollections]);
13430
13453
  React.useEffect(function () {
13431
13454
  if (productfeatuesarr.length != 0) {
13432
13455
  var tempfetchproductsfilerobjcontext = _objectSpread$28({}, ProductFilterObjContext);
@@ -13633,7 +13656,7 @@
13633
13656
  }))))));
13634
13657
  };
13635
13658
  var AccordionOuter = function AccordionOuter(categoryItem, categoryIndex) {
13636
- var _authdetailsContext$i3;
13659
+ var _instcategories$categ;
13637
13660
  return /*#__PURE__*/React__default["default"].createElement(reactAccessibleAccordion.AccordionItem, {
13638
13661
  uuid: categoryIndex
13639
13662
  }, /*#__PURE__*/React__default["default"].createElement(reactAccessibleAccordion.AccordionItemHeading, null, /*#__PURE__*/React__default["default"].createElement(reactAccessibleAccordion.AccordionItemButton, null, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -13672,7 +13695,7 @@
13672
13695
  onClick: function onClick() {
13673
13696
  routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, 'categories/' + categoryItem.categoryid);
13674
13697
  }
13675
- }, langdetect == 'en' ? sectionproperties.explorebtncontenten : sectionproperties.explorebtncontentar, ' ', langdetect == 'en' ? categoryItem.title_en : categoryItem.title_ar)), authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i3 = authdetailsContext.instinfo) === null || _authdetailsContext$i3 === void 0 || (_authdetailsContext$i3 = _authdetailsContext$i3.instcategories[categoryIndex]) === null || _authdetailsContext$i3 === void 0 ? void 0 : _authdetailsContext$i3.parentcolletions.map(function (parentcollectionitem, parentcollectionindex) {
13698
+ }, 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) {
13676
13699
  if (parentcollectionitem.isinftiler == 1) {
13677
13700
  return /*#__PURE__*/React__default["default"].createElement("div", {
13678
13701
  "class": "col-lg-12"
@@ -15010,6 +15033,7 @@
15010
15033
  var fetchingtype = props.actions.fetchingtype;
15011
15034
  props.actions.addtofavoritescontext;
15012
15035
  var fetchAuthorizationQueryContext = props.actions.fetchAuthorizationQueryContext;
15036
+ var fetchCategoriesQueryContext = props.actions.fetchCategoriesQueryContext;
15013
15037
  var FetchVendorsQuery = props.actions.FetchVendorsQuery;
15014
15038
  props.actions.ikimagecredcontext;
15015
15039
  props.actions.sortbycontext;
@@ -15146,47 +15170,49 @@
15146
15170
  tempfetchproductsfilerobjcontext.grouptyperefid = ProductsFetchingTypeSectionObj.grouptyperefid;
15147
15171
  setProductFilterObjContext(_objectSpread$26({}, tempfetchproductsfilerobjcontext));
15148
15172
  }
15173
+ setFetchQueriesEngineContext(_objectSpread$26({}, tempFetchQueriesEngineContext));
15174
+ }
15175
+ }, [fetchingtype, ProductsFetchingTypeSectionObj]);
15176
+ React.useEffect(function () {
15177
+ if ((fetchingtype === null || fetchingtype === void 0 ? void 0 : fetchingtype.length) != 0) {
15149
15178
  if (fetchingtype == 'categories') {
15150
- if (fetchAuthorizationQueryContext !== null && fetchAuthorizationQueryContext !== void 0 && fetchAuthorizationQueryContext.isSuccess) {
15151
- var categories = fetchAuthorizationQueryContext.data.data.instinfo.instcategories;
15152
- cardobjassigner(categories);
15179
+ var categories = [];
15180
+ if (fetchCategoriesQueryContext !== null && fetchCategoriesQueryContext !== void 0 && fetchCategoriesQueryContext.isSuccess) {
15181
+ var _fetchCategoriesQuery;
15182
+ categories = fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 || (_fetchCategoriesQuery = fetchCategoriesQueryContext.data) === null || _fetchCategoriesQuery === void 0 || (_fetchCategoriesQuery = _fetchCategoriesQuery.data) === null || _fetchCategoriesQuery === void 0 ? void 0 : _fetchCategoriesQuery.categories;
15153
15183
  }
15184
+ cardobjassigner(categories);
15154
15185
  }
15155
15186
  if (fetchingtype == 'parentcollections' || fetchingtype == 'innercategories') {
15156
- if (fetchAuthorizationQueryContext !== null && fetchAuthorizationQueryContext !== void 0 && fetchAuthorizationQueryContext.isSuccess) {
15157
- var _categories;
15158
- var categories = fetchAuthorizationQueryContext.data.data.instinfo.instcategories;
15159
- // alert(JSON.stringify(categories));
15160
- var parentcollections = [];
15161
- (_categories = categories) === null || _categories === void 0 || _categories.forEach(function (catitem, catindex) {
15162
- catitem === null || catitem === void 0 || catitem.parentcolletions.forEach(function (parentcolitem) {
15163
- if (parentcolitem.isshowntocustomers == 1) {
15164
- parentcolitem.categoryid = catitem.categoryid;
15165
- parentcollections.push(parentcolitem);
15187
+ var _categories;
15188
+ var categories = [];
15189
+ if (fetchCategoriesQueryContext !== null && fetchCategoriesQueryContext !== void 0 && fetchCategoriesQueryContext.isSuccess) {
15190
+ var _fetchCategoriesQuery2;
15191
+ categories = fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 || (_fetchCategoriesQuery2 = fetchCategoriesQueryContext.data) === null || _fetchCategoriesQuery2 === void 0 || (_fetchCategoriesQuery2 = _fetchCategoriesQuery2.data) === null || _fetchCategoriesQuery2 === void 0 ? void 0 : _fetchCategoriesQuery2.categories;
15192
+ }
15193
+ // if (fetchAuthorizationQueryContext?.isSuccess) {
15194
+ // var categories = fetchAuthorizationQueryContext.data.data.instinfo.instcategories;
15195
+ // alert(JSON.stringify(categories));
15196
+ var parentcollections = [];
15197
+ (_categories = categories) === null || _categories === void 0 || _categories.forEach(function (catitem, catindex) {
15198
+ catitem === null || catitem === void 0 || catitem.parentcolletions.forEach(function (parentcolitem) {
15199
+ if (parentcolitem.isshowntocustomers == 1) {
15200
+ parentcolitem.categoryid = catitem.categoryid;
15201
+ parentcollections.push(parentcolitem);
15202
+ }
15203
+ });
15204
+ });
15205
+ if (fetchingtype == 'parentcollections') {
15206
+ 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') {
15207
+ var arrafterfilter = [];
15208
+ parentcollections.forEach(function (parentcolitem, parcolindex) {
15209
+ if (parentcolitem.categoryid == (sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid)) {
15210
+ arrafterfilter.push(parentcolitem);
15166
15211
  }
15167
15212
  });
15168
- });
15169
- if (fetchingtype == 'parentcollections') {
15170
- 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') {
15171
- var arrafterfilter = [];
15172
- parentcollections.forEach(function (parentcolitem, parcolindex) {
15173
- if (parentcolitem.categoryid == (sectionitem === null || sectionitem === void 0 ? void 0 : sectionitem.productsfetchingtypeparentcollectioncategoryid)) {
15174
- arrafterfilter.push(parentcolitem);
15175
- }
15176
- });
15177
- parentcollections = arrafterfilter;
15178
- }
15179
- if (props.collectionidprops != null && props.collectionidprops != undefined && props.collectionidprops != 'all') {
15180
- var arrafterfilter = [];
15181
- parentcollections.forEach(function (parentcolitem, parcolindex) {
15182
- if (parentcolitem.categoryid == props.collectionidprops) {
15183
- arrafterfilter.push(parentcolitem);
15184
- }
15185
- });
15186
- parentcollections = arrafterfilter;
15187
- }
15213
+ parentcollections = arrafterfilter;
15188
15214
  }
15189
- if (fetchingtype == 'innercategories') {
15215
+ if (props.collectionidprops != null && props.collectionidprops != undefined && props.collectionidprops != 'all') {
15190
15216
  var arrafterfilter = [];
15191
15217
  parentcollections.forEach(function (parentcolitem, parcolindex) {
15192
15218
  if (parentcolitem.categoryid == props.collectionidprops) {
@@ -15195,48 +15221,62 @@
15195
15221
  });
15196
15222
  parentcollections = arrafterfilter;
15197
15223
  }
15198
- cardobjassigner(parentcollections);
15199
15224
  }
15225
+ if (fetchingtype == 'innercategories') {
15226
+ var arrafterfilter = [];
15227
+ parentcollections.forEach(function (parentcolitem, parcolindex) {
15228
+ if (parentcolitem.categoryid == props.collectionidprops) {
15229
+ arrafterfilter.push(parentcolitem);
15230
+ }
15231
+ });
15232
+ parentcollections = arrafterfilter;
15233
+ }
15234
+ cardobjassigner(parentcollections);
15235
+ // }
15200
15236
  } else if (fetchingtype == 'innerparentcollections') {
15201
- if (fetchAuthorizationQueryContext !== null && fetchAuthorizationQueryContext !== void 0 && fetchAuthorizationQueryContext.isSuccess) {
15202
- var _categories2;
15203
- var categories = fetchAuthorizationQueryContext.data.data.instinfo.instcategories;
15204
- var collections = [];
15205
- (_categories2 = categories) === null || _categories2 === void 0 || _categories2.forEach(function (catitem, catindex) {
15206
- catitem === null || catitem === void 0 || catitem.parentcolletions.forEach(function (parentcolitem) {
15207
- var _parentcolitem$collec;
15208
- parentcolitem.categoryid = catitem.categoryid;
15209
- parentcolitem === null || parentcolitem === void 0 || (_parentcolitem$collec = parentcolitem.collections) === null || _parentcolitem$collec === void 0 || _parentcolitem$collec.forEach(function (collitem, colindex) {
15210
- if (collitem.isshowntocustomers == 1) {
15211
- collitem.parentcollectionid = parentcolitem.parentcollectionid;
15212
- collections.push(collitem);
15213
- }
15214
- });
15237
+ var _categories2;
15238
+ var categories = [];
15239
+ if (fetchCategoriesQueryContext !== null && fetchCategoriesQueryContext !== void 0 && fetchCategoriesQueryContext.isSuccess) {
15240
+ var _fetchCategoriesQuery3;
15241
+ categories = fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 || (_fetchCategoriesQuery3 = fetchCategoriesQueryContext.data) === null || _fetchCategoriesQuery3 === void 0 || (_fetchCategoriesQuery3 = _fetchCategoriesQuery3.data) === null || _fetchCategoriesQuery3 === void 0 ? void 0 : _fetchCategoriesQuery3.categories;
15242
+ }
15243
+ // if (fetchAuthorizationQueryContext?.isSuccess) {
15244
+ // var categories = fetchAuthorizationQueryContext.data.data.instinfo.instcategories;
15245
+ var collections = [];
15246
+ (_categories2 = categories) === null || _categories2 === void 0 || _categories2.forEach(function (catitem, catindex) {
15247
+ catitem === null || catitem === void 0 || catitem.parentcolletions.forEach(function (parentcolitem) {
15248
+ var _parentcolitem$collec;
15249
+ parentcolitem.categoryid = catitem.categoryid;
15250
+ parentcolitem === null || parentcolitem === void 0 || (_parentcolitem$collec = parentcolitem.collections) === null || _parentcolitem$collec === void 0 || _parentcolitem$collec.forEach(function (collitem, colindex) {
15251
+ if (collitem.isshowntocustomers == 1) {
15252
+ collitem.parentcollectionid = parentcolitem.parentcollectionid;
15253
+ collections.push(collitem);
15254
+ }
15215
15255
  });
15216
15256
  });
15217
- if (fetchingtype == 'innerparentcollections') {
15218
- var collectionsafterfilter = [];
15219
- collections.forEach(function (colitem, colindex) {
15220
- if (colitem.parentcollectionid == props.collectionidprops) {
15221
- var iscollexists = false;
15222
- collectionsafterfilter.forEach(function (existcolitem) {
15223
- if (colitem.collectionid == existcolitem.collectionid) {
15224
- iscollexists = true;
15225
- }
15226
- });
15227
- if (iscollexists == false) {
15228
- collectionsafterfilter.push(colitem);
15257
+ });
15258
+ if (fetchingtype == 'innerparentcollections') {
15259
+ var collectionsafterfilter = [];
15260
+ collections.forEach(function (colitem, colindex) {
15261
+ if (colitem.parentcollectionid == props.collectionidprops) {
15262
+ var iscollexists = false;
15263
+ collectionsafterfilter.forEach(function (existcolitem) {
15264
+ if (colitem.collectionid == existcolitem.collectionid) {
15265
+ iscollexists = true;
15229
15266
  }
15267
+ });
15268
+ if (iscollexists == false) {
15269
+ collectionsafterfilter.push(colitem);
15230
15270
  }
15231
- });
15232
- collections = collectionsafterfilter;
15233
- }
15234
- cardobjassigner(collections);
15271
+ }
15272
+ });
15273
+ collections = collectionsafterfilter;
15235
15274
  }
15275
+ cardobjassigner(collections);
15276
+ // }
15236
15277
  }
15237
- setFetchQueriesEngineContext(_objectSpread$26({}, tempFetchQueriesEngineContext));
15238
15278
  }
15239
- }, [fetchingtype, ProductsFetchingTypeSectionObj]);
15279
+ }, [fetchingtype, ProductsFetchingTypeSectionObj, fetchCategoriesQueryContext.isSuccess]);
15240
15280
  React.useEffect(function () {
15241
15281
  if (fetchingtype == 'products') {
15242
15282
  if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
@@ -15355,9 +15395,11 @@
15355
15395
  cardobj.productcanrate = arrayItem.productinfo.productcanrate;
15356
15396
  cardobj.sku = arrayItem.productinfo.sku;
15357
15397
  if (langdetect == 'en') {
15358
- cardobj.currencyname = fetchAuthorizationQueryContext === null || fetchAuthorizationQueryContext === void 0 ? void 0 : fetchAuthorizationQueryContext.data.data.currencyname_en;
15398
+ var _fetchAuthorizationQu;
15399
+ 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;
15359
15400
  } else {
15360
- cardobj.currencyname = fetchAuthorizationQueryContext === null || fetchAuthorizationQueryContext === void 0 ? void 0 : fetchAuthorizationQueryContext.data.data.currencyname_ar;
15401
+ var _fetchAuthorizationQu2;
15402
+ 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;
15361
15403
  }
15362
15404
  if (favoriteprojectscountContext != undefined && favoriteprojectscountContext.length != 0) {
15363
15405
  favoriteprojectscountContext.forEach(function (favitem, favindex) {
@@ -15671,7 +15713,7 @@
15671
15713
  isloading = true;
15672
15714
  }
15673
15715
  } else {
15674
- if ((fetchAuthorizationQueryContext === null || fetchAuthorizationQueryContext === void 0 ? void 0 : fetchAuthorizationQueryContext.isFetching) == true || (fetchcollectionsQueryContext === null || fetchcollectionsQueryContext === void 0 ? void 0 : fetchcollectionsQueryContext.isFetching) == true) {
15716
+ if ((fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 ? void 0 : fetchCategoriesQueryContext.isFetching) == true || (fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 ? void 0 : fetchCategoriesQueryContext.isFetching) == true) {
15675
15717
  isloading = true;
15676
15718
  }
15677
15719
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tabexseriescomponents",
3
- "version": "0.0.413",
3
+ "version": "0.0.414",
4
4
  "description": "your description",
5
5
  "main": "dist/index.cjs.js",
6
6
  "scripts": {
package/src 2.zip ADDED
Binary file
Binary file