tabexseriescomponents 0.0.175 → 0.0.177
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 +51 -15
- package/dist/index.esm.js +51 -15
- package/dist/index.umd.js +51 -15
- 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({
|
|
@@ -8807,7 +8818,9 @@ var Filter$1 = function Filter(props) {
|
|
|
8807
8818
|
} else {
|
|
8808
8819
|
tempfetchproductsfilerobjcontext[item.payloadvalue] = valueitem.value;
|
|
8809
8820
|
}
|
|
8821
|
+
tempfetchproductsfilerobjcontext.page = 0;
|
|
8810
8822
|
setProductFilterObjContext(_objectSpread$1C({}, tempfetchproductsfilerobjcontext));
|
|
8823
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, encodeURIComponent(JSON.stringify(tempfetchproductsfilerobjcontext)));
|
|
8811
8824
|
}
|
|
8812
8825
|
}, /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
8813
8826
|
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 +9284,15 @@ var CardsSection = function CardsSection(props) {
|
|
|
9271
9284
|
// }
|
|
9272
9285
|
// }, [inView]);
|
|
9273
9286
|
React.useEffect(function () {
|
|
9287
|
+
var productfilerobjtemp = ProductFilterObjContext;
|
|
9288
|
+
if (props.filterparamsprops != undefined) {
|
|
9289
|
+
var filterpar = decodeURIComponent(props.filterparamsprops);
|
|
9290
|
+
var filterparsed = JSON.parse(filterpar);
|
|
9291
|
+
if (filterparsed != undefined) {
|
|
9292
|
+
productfilerobjtemp = filterparsed;
|
|
9293
|
+
setProductFilterObjContext(filterparsed);
|
|
9294
|
+
}
|
|
9295
|
+
}
|
|
9274
9296
|
StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
|
|
9275
9297
|
if (sectionitem.sectionid == props.sectionidprops) {
|
|
9276
9298
|
var secpropobj = {};
|
|
@@ -9281,8 +9303,12 @@ var CardsSection = function CardsSection(props) {
|
|
|
9281
9303
|
setsectionproperties(_objectSpread$1B({}, secpropobj));
|
|
9282
9304
|
if (props.srcfromprops == 'GeneralProductsComponent') {
|
|
9283
9305
|
setfetchingtype('products');
|
|
9306
|
+
var lcproductfetchingtype = 'Random';
|
|
9307
|
+
if (productfilerobjtemp.ProductFetchingType != undefined && productfilerobjtemp.ProductFetchingType != null && productfilerobjtemp.ProductFetchingType.length != 0) {
|
|
9308
|
+
lcproductfetchingtype = productfilerobjtemp.ProductFetchingType;
|
|
9309
|
+
}
|
|
9284
9310
|
setProductsFetchingTypeSectionObj({
|
|
9285
|
-
productfetchingtype:
|
|
9311
|
+
productfetchingtype: lcproductfetchingtype,
|
|
9286
9312
|
collectionid: props.collectionidprops,
|
|
9287
9313
|
grouptype: props.grouptypeprops,
|
|
9288
9314
|
grouptyperefid: props.grouptyperefidprops
|
|
@@ -9340,7 +9366,9 @@ var CardsSection = function CardsSection(props) {
|
|
|
9340
9366
|
var tempfetchproductsfilerobjcontext = ProductFilterObjContext;
|
|
9341
9367
|
tempfetchproductsfilerobjcontext.ProductFetchingType = ProductsFetchingTypeSectionObj.productfetchingtype;
|
|
9342
9368
|
if (ProductsFetchingTypeSectionObj.grouptype == 'collections' || ProductsFetchingTypeSectionObj.grouptype == 'categories' || ProductsFetchingTypeSectionObj.grouptype == 'parentcollections') ; else {
|
|
9343
|
-
tempfetchproductsfilerobjcontext.collections
|
|
9369
|
+
if (tempfetchproductsfilerobjcontext.collections != undefined) {
|
|
9370
|
+
tempfetchproductsfilerobjcontext.collections.push(ProductsFetchingTypeSectionObj.collectionid);
|
|
9371
|
+
}
|
|
9344
9372
|
}
|
|
9345
9373
|
tempfetchproductsfilerobjcontext.grouptype = ProductsFetchingTypeSectionObj.grouptype;
|
|
9346
9374
|
tempfetchproductsfilerobjcontext.grouptyperefid = ProductsFetchingTypeSectionObj.grouptyperefid;
|
|
@@ -9569,16 +9597,24 @@ var CardsSection = function CardsSection(props) {
|
|
|
9569
9597
|
var tempProductFilterObjContext = _objectSpread$1B({}, ProductFilterObjContext);
|
|
9570
9598
|
tempProductFilterObjContext.page = event === null || event === void 0 ? void 0 : event.selected;
|
|
9571
9599
|
setProductFilterObjContext(_objectSpread$1B({}, tempProductFilterObjContext));
|
|
9600
|
+
var pasturl = '';
|
|
9601
|
+
if (props.grouptypeprops != undefined) {
|
|
9602
|
+
if (props.collectionidprops != undefined) {
|
|
9603
|
+
pasturl = props.grouptypeprops + '/' + props.collectionidprops + '/';
|
|
9604
|
+
}
|
|
9605
|
+
}
|
|
9606
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, pasturl + encodeURIComponent(JSON.stringify(tempProductFilterObjContext)));
|
|
9572
9607
|
};
|
|
9573
9608
|
function PaginatedItems(_ref) {
|
|
9574
9609
|
var _fetchProductsQuery$d7, _fetchProductsQuery$d8, _fetchProductsQuery$d9, _fetchProductsQuery$d10;
|
|
9575
9610
|
_ref.itemsPerPage;
|
|
9576
9611
|
// Here we use item offsets; we could also use page offsets
|
|
9577
9612
|
// following the API or data you're working with.
|
|
9578
|
-
|
|
9579
|
-
|
|
9580
|
-
|
|
9581
|
-
|
|
9613
|
+
// const [itemOffset, setItemOffset] = useState(0);
|
|
9614
|
+
// Simulate fetching items from another resources.
|
|
9615
|
+
// (This could be items from props; or items loaded in a local state
|
|
9616
|
+
// from an API endpoint with useEffect and useState)
|
|
9617
|
+
// const endOffset = itemOffset + itemsPerPage;
|
|
9582
9618
|
|
|
9583
9619
|
// const currentItems = items.slice(itemOffset, endOffset);
|
|
9584
9620
|
// const pageCount = Math.ceil(items.length / itemsPerPage);
|
|
@@ -9879,7 +9915,7 @@ var CardsSection = function CardsSection(props) {
|
|
|
9879
9915
|
if (ProductsFetchingTypeSectionObj.productfetchingtype == 'Collection') {
|
|
9880
9916
|
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, 'collections/' + ProductsFetchingTypeSectionObj.collectionid);
|
|
9881
9917
|
} else {
|
|
9882
|
-
routingcountext(StaticPagesLinksContext.GeneralProductsComponent,
|
|
9918
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, encodeURIComponent(JSON.stringify(ProductFilterObjContext)));
|
|
9883
9919
|
}
|
|
9884
9920
|
} else {
|
|
9885
9921
|
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, false);
|
package/dist/index.esm.js
CHANGED
|
@@ -8391,6 +8391,8 @@ var Filter$1 = function Filter(props) {
|
|
|
8391
8391
|
var ProductFilterObjContext = props.actions.ProductFilterObjContext;
|
|
8392
8392
|
var setProductFilterObjContext = props.actions.setProductFilterObjContext;
|
|
8393
8393
|
var authdetailsContext = props.actions.authdetailsContext;
|
|
8394
|
+
var routingcountext = props.actions.routingcountext;
|
|
8395
|
+
var StaticPagesLinksContext = props.actions.StaticPagesLinksContext;
|
|
8394
8396
|
var _useState = useState(''),
|
|
8395
8397
|
_useState2 = _slicedToArray(_useState, 2),
|
|
8396
8398
|
sectionproperties = _useState2[0],
|
|
@@ -8452,15 +8454,17 @@ var Filter$1 = function Filter(props) {
|
|
|
8452
8454
|
}, [ProductFilterObjContext]);
|
|
8453
8455
|
var filterupdater = function filterupdater() {
|
|
8454
8456
|
if (instfilters.length != 0) {
|
|
8457
|
+
var _ProductFilterObjCont;
|
|
8455
8458
|
var tempinstfilters = _toConsumableArray(instfilters);
|
|
8456
|
-
tempinstfilters.forEach(function (instfilteritem, instfilterindex) {
|
|
8459
|
+
tempinstfilters === null || tempinstfilters === void 0 ? void 0 : tempinstfilters.forEach(function (instfilteritem, instfilterindex) {
|
|
8457
8460
|
instfilteritem.productvaluesfilter.forEach(function (valefilteritem, valefilteritemindex) {
|
|
8458
8461
|
valefilteritem.isfilterselected = false;
|
|
8459
8462
|
});
|
|
8460
8463
|
});
|
|
8461
|
-
ProductFilterObjContext.FilterOptions.forEach(function (filteritem, filterindex) {
|
|
8462
|
-
tempinstfilters.forEach(function (instfilteritem, instfilterindex) {
|
|
8463
|
-
|
|
8464
|
+
ProductFilterObjContext === null || ProductFilterObjContext === void 0 ? void 0 : (_ProductFilterObjCont = ProductFilterObjContext.FilterOptions) === null || _ProductFilterObjCont === void 0 ? void 0 : _ProductFilterObjCont.forEach(function (filteritem, filterindex) {
|
|
8465
|
+
tempinstfilters === null || tempinstfilters === void 0 ? void 0 : tempinstfilters.forEach(function (instfilteritem, instfilterindex) {
|
|
8466
|
+
var _instfilteritem$produ;
|
|
8467
|
+
instfilteritem === null || instfilteritem === void 0 ? void 0 : (_instfilteritem$produ = instfilteritem.productvaluesfilter) === null || _instfilteritem$produ === void 0 ? void 0 : _instfilteritem$produ.forEach(function (valefilteritem, valefilteritemindex) {
|
|
8464
8468
|
if (filteritem.valueid == valefilteritem.valueid) {
|
|
8465
8469
|
valefilteritem.isfilterselected = true;
|
|
8466
8470
|
}
|
|
@@ -8470,12 +8474,13 @@ var Filter$1 = function Filter(props) {
|
|
|
8470
8474
|
setinstfilters(_toConsumableArray(tempinstfilters));
|
|
8471
8475
|
}
|
|
8472
8476
|
if (instcollections.length != 0) {
|
|
8477
|
+
var _ProductFilterObjCont2;
|
|
8473
8478
|
var tempInstcollections = _toConsumableArray(instcollections);
|
|
8474
8479
|
tempInstcollections.forEach(function (instfilteritem, valefilteritemindex) {
|
|
8475
8480
|
instfilteritem.isfilterselected = false;
|
|
8476
8481
|
});
|
|
8477
|
-
ProductFilterObjContext.collections.forEach(function (filteritem, filterindex) {
|
|
8478
|
-
tempInstcollections.forEach(function (instfilteritem, instfilterindex) {
|
|
8482
|
+
ProductFilterObjContext === null || ProductFilterObjContext === void 0 ? void 0 : (_ProductFilterObjCont2 = ProductFilterObjContext.collections) === null || _ProductFilterObjCont2 === void 0 ? void 0 : _ProductFilterObjCont2.forEach(function (filteritem, filterindex) {
|
|
8483
|
+
tempInstcollections === null || tempInstcollections === void 0 ? void 0 : tempInstcollections.forEach(function (instfilteritem, instfilterindex) {
|
|
8479
8484
|
if (instfilteritem.collectionid == filteritem) {
|
|
8480
8485
|
instfilteritem.isfilterselected = true;
|
|
8481
8486
|
}
|
|
@@ -8489,8 +8494,9 @@ var Filter$1 = function Filter(props) {
|
|
|
8489
8494
|
if (type == 'clearfilters') {
|
|
8490
8495
|
tempfetchproductsfilerobjcontext.FilterOptions = [];
|
|
8491
8496
|
} else {
|
|
8497
|
+
var _tempfetchproductsfil;
|
|
8492
8498
|
var FilterExists = false;
|
|
8493
|
-
tempfetchproductsfilerobjcontext.FilterOptions.forEach(function (filteritem, filterindex) {
|
|
8499
|
+
tempfetchproductsfilerobjcontext === null || tempfetchproductsfilerobjcontext === void 0 ? void 0 : (_tempfetchproductsfil = tempfetchproductsfilerobjcontext.FilterOptions) === null || _tempfetchproductsfil === void 0 ? void 0 : _tempfetchproductsfil.forEach(function (filteritem, filterindex) {
|
|
8494
8500
|
if (filteritem.valueid == valueid) {
|
|
8495
8501
|
FilterExists = true;
|
|
8496
8502
|
tempfetchproductsfilerobjcontext.FilterOptions.splice(filterindex, 1);
|
|
@@ -8507,12 +8513,15 @@ var Filter$1 = function Filter(props) {
|
|
|
8507
8513
|
} else {
|
|
8508
8514
|
tempfetchproductsfilerobjcontext.isfilter = 1;
|
|
8509
8515
|
}
|
|
8516
|
+
tempfetchproductsfilerobjcontext.page = 0;
|
|
8510
8517
|
setProductFilterObjContext(_objectSpread$1C({}, tempfetchproductsfilerobjcontext));
|
|
8518
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, encodeURIComponent(JSON.stringify(tempfetchproductsfilerobjcontext)));
|
|
8511
8519
|
};
|
|
8512
8520
|
var setCollectionFilterFunc = function setCollectionFilterFunc(collectionid) {
|
|
8521
|
+
var _tempfetchproductsfil2;
|
|
8513
8522
|
var tempfetchproductsfilerobjcontext = _objectSpread$1C({}, ProductFilterObjContext);
|
|
8514
8523
|
var CollectionExists = false;
|
|
8515
|
-
tempfetchproductsfilerobjcontext.collections.forEach(function (filteritem, filterindex) {
|
|
8524
|
+
tempfetchproductsfilerobjcontext === null || tempfetchproductsfilerobjcontext === void 0 ? void 0 : (_tempfetchproductsfil2 = tempfetchproductsfilerobjcontext.collections) === null || _tempfetchproductsfil2 === void 0 ? void 0 : _tempfetchproductsfil2.forEach(function (filteritem, filterindex) {
|
|
8516
8525
|
if (filteritem == collectionid) {
|
|
8517
8526
|
CollectionExists = true;
|
|
8518
8527
|
tempfetchproductsfilerobjcontext.collections.splice(filterindex, 1);
|
|
@@ -8521,7 +8530,9 @@ var Filter$1 = function Filter(props) {
|
|
|
8521
8530
|
if (!CollectionExists) {
|
|
8522
8531
|
tempfetchproductsfilerobjcontext.collections.push(collectionid);
|
|
8523
8532
|
}
|
|
8533
|
+
tempfetchproductsfilerobjcontext.page = 0;
|
|
8524
8534
|
setProductFilterObjContext(_objectSpread$1C({}, tempfetchproductsfilerobjcontext));
|
|
8535
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, encodeURIComponent(JSON.stringify(tempfetchproductsfilerobjcontext)));
|
|
8525
8536
|
};
|
|
8526
8537
|
var filter_cssstyles = {
|
|
8527
8538
|
collapsetitle: css({
|
|
@@ -8763,7 +8774,9 @@ var Filter$1 = function Filter(props) {
|
|
|
8763
8774
|
} else {
|
|
8764
8775
|
tempfetchproductsfilerobjcontext[item.payloadvalue] = valueitem.value;
|
|
8765
8776
|
}
|
|
8777
|
+
tempfetchproductsfilerobjcontext.page = 0;
|
|
8766
8778
|
setProductFilterObjContext(_objectSpread$1C({}, tempfetchproductsfilerobjcontext));
|
|
8779
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, encodeURIComponent(JSON.stringify(tempfetchproductsfilerobjcontext)));
|
|
8767
8780
|
}
|
|
8768
8781
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
8769
8782
|
className: " ".concat(ischecked ? filter_cssstyles.btn_item_active : '', " ").concat(filterstyles.btn_item, " ").concat(filter_cssstyles.btn_item) + ' mb-2 d-flex align-items-center '
|
|
@@ -9227,6 +9240,15 @@ var CardsSection = function CardsSection(props) {
|
|
|
9227
9240
|
// }
|
|
9228
9241
|
// }, [inView]);
|
|
9229
9242
|
useEffect(function () {
|
|
9243
|
+
var productfilerobjtemp = ProductFilterObjContext;
|
|
9244
|
+
if (props.filterparamsprops != undefined) {
|
|
9245
|
+
var filterpar = decodeURIComponent(props.filterparamsprops);
|
|
9246
|
+
var filterparsed = JSON.parse(filterpar);
|
|
9247
|
+
if (filterparsed != undefined) {
|
|
9248
|
+
productfilerobjtemp = filterparsed;
|
|
9249
|
+
setProductFilterObjContext(filterparsed);
|
|
9250
|
+
}
|
|
9251
|
+
}
|
|
9230
9252
|
StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
|
|
9231
9253
|
if (sectionitem.sectionid == props.sectionidprops) {
|
|
9232
9254
|
var secpropobj = {};
|
|
@@ -9237,8 +9259,12 @@ var CardsSection = function CardsSection(props) {
|
|
|
9237
9259
|
setsectionproperties(_objectSpread$1B({}, secpropobj));
|
|
9238
9260
|
if (props.srcfromprops == 'GeneralProductsComponent') {
|
|
9239
9261
|
setfetchingtype('products');
|
|
9262
|
+
var lcproductfetchingtype = 'Random';
|
|
9263
|
+
if (productfilerobjtemp.ProductFetchingType != undefined && productfilerobjtemp.ProductFetchingType != null && productfilerobjtemp.ProductFetchingType.length != 0) {
|
|
9264
|
+
lcproductfetchingtype = productfilerobjtemp.ProductFetchingType;
|
|
9265
|
+
}
|
|
9240
9266
|
setProductsFetchingTypeSectionObj({
|
|
9241
|
-
productfetchingtype:
|
|
9267
|
+
productfetchingtype: lcproductfetchingtype,
|
|
9242
9268
|
collectionid: props.collectionidprops,
|
|
9243
9269
|
grouptype: props.grouptypeprops,
|
|
9244
9270
|
grouptyperefid: props.grouptyperefidprops
|
|
@@ -9296,7 +9322,9 @@ var CardsSection = function CardsSection(props) {
|
|
|
9296
9322
|
var tempfetchproductsfilerobjcontext = ProductFilterObjContext;
|
|
9297
9323
|
tempfetchproductsfilerobjcontext.ProductFetchingType = ProductsFetchingTypeSectionObj.productfetchingtype;
|
|
9298
9324
|
if (ProductsFetchingTypeSectionObj.grouptype == 'collections' || ProductsFetchingTypeSectionObj.grouptype == 'categories' || ProductsFetchingTypeSectionObj.grouptype == 'parentcollections') ; else {
|
|
9299
|
-
tempfetchproductsfilerobjcontext.collections
|
|
9325
|
+
if (tempfetchproductsfilerobjcontext.collections != undefined) {
|
|
9326
|
+
tempfetchproductsfilerobjcontext.collections.push(ProductsFetchingTypeSectionObj.collectionid);
|
|
9327
|
+
}
|
|
9300
9328
|
}
|
|
9301
9329
|
tempfetchproductsfilerobjcontext.grouptype = ProductsFetchingTypeSectionObj.grouptype;
|
|
9302
9330
|
tempfetchproductsfilerobjcontext.grouptyperefid = ProductsFetchingTypeSectionObj.grouptyperefid;
|
|
@@ -9525,16 +9553,24 @@ var CardsSection = function CardsSection(props) {
|
|
|
9525
9553
|
var tempProductFilterObjContext = _objectSpread$1B({}, ProductFilterObjContext);
|
|
9526
9554
|
tempProductFilterObjContext.page = event === null || event === void 0 ? void 0 : event.selected;
|
|
9527
9555
|
setProductFilterObjContext(_objectSpread$1B({}, tempProductFilterObjContext));
|
|
9556
|
+
var pasturl = '';
|
|
9557
|
+
if (props.grouptypeprops != undefined) {
|
|
9558
|
+
if (props.collectionidprops != undefined) {
|
|
9559
|
+
pasturl = props.grouptypeprops + '/' + props.collectionidprops + '/';
|
|
9560
|
+
}
|
|
9561
|
+
}
|
|
9562
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, pasturl + encodeURIComponent(JSON.stringify(tempProductFilterObjContext)));
|
|
9528
9563
|
};
|
|
9529
9564
|
function PaginatedItems(_ref) {
|
|
9530
9565
|
var _fetchProductsQuery$d7, _fetchProductsQuery$d8, _fetchProductsQuery$d9, _fetchProductsQuery$d10;
|
|
9531
9566
|
_ref.itemsPerPage;
|
|
9532
9567
|
// Here we use item offsets; we could also use page offsets
|
|
9533
9568
|
// following the API or data you're working with.
|
|
9534
|
-
|
|
9535
|
-
|
|
9536
|
-
|
|
9537
|
-
|
|
9569
|
+
// const [itemOffset, setItemOffset] = useState(0);
|
|
9570
|
+
// Simulate fetching items from another resources.
|
|
9571
|
+
// (This could be items from props; or items loaded in a local state
|
|
9572
|
+
// from an API endpoint with useEffect and useState)
|
|
9573
|
+
// const endOffset = itemOffset + itemsPerPage;
|
|
9538
9574
|
|
|
9539
9575
|
// const currentItems = items.slice(itemOffset, endOffset);
|
|
9540
9576
|
// const pageCount = Math.ceil(items.length / itemsPerPage);
|
|
@@ -9835,7 +9871,7 @@ var CardsSection = function CardsSection(props) {
|
|
|
9835
9871
|
if (ProductsFetchingTypeSectionObj.productfetchingtype == 'Collection') {
|
|
9836
9872
|
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, 'collections/' + ProductsFetchingTypeSectionObj.collectionid);
|
|
9837
9873
|
} else {
|
|
9838
|
-
routingcountext(StaticPagesLinksContext.GeneralProductsComponent,
|
|
9874
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, encodeURIComponent(JSON.stringify(ProductFilterObjContext)));
|
|
9839
9875
|
}
|
|
9840
9876
|
} else {
|
|
9841
9877
|
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, false);
|
package/dist/index.umd.js
CHANGED
|
@@ -8296,6 +8296,8 @@
|
|
|
8296
8296
|
var ProductFilterObjContext = props.actions.ProductFilterObjContext;
|
|
8297
8297
|
var setProductFilterObjContext = props.actions.setProductFilterObjContext;
|
|
8298
8298
|
var authdetailsContext = props.actions.authdetailsContext;
|
|
8299
|
+
var routingcountext = props.actions.routingcountext;
|
|
8300
|
+
var StaticPagesLinksContext = props.actions.StaticPagesLinksContext;
|
|
8299
8301
|
var _useState = React.useState(''),
|
|
8300
8302
|
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
8301
8303
|
sectionproperties = _useState2[0],
|
|
@@ -8357,15 +8359,17 @@
|
|
|
8357
8359
|
}, [ProductFilterObjContext]);
|
|
8358
8360
|
var filterupdater = function filterupdater() {
|
|
8359
8361
|
if (instfilters.length != 0) {
|
|
8362
|
+
var _ProductFilterObjCont;
|
|
8360
8363
|
var tempinstfilters = _toConsumableArray__default["default"](instfilters);
|
|
8361
|
-
tempinstfilters.forEach(function (instfilteritem, instfilterindex) {
|
|
8364
|
+
tempinstfilters === null || tempinstfilters === void 0 ? void 0 : tempinstfilters.forEach(function (instfilteritem, instfilterindex) {
|
|
8362
8365
|
instfilteritem.productvaluesfilter.forEach(function (valefilteritem, valefilteritemindex) {
|
|
8363
8366
|
valefilteritem.isfilterselected = false;
|
|
8364
8367
|
});
|
|
8365
8368
|
});
|
|
8366
|
-
ProductFilterObjContext.FilterOptions.forEach(function (filteritem, filterindex) {
|
|
8367
|
-
tempinstfilters.forEach(function (instfilteritem, instfilterindex) {
|
|
8368
|
-
|
|
8369
|
+
ProductFilterObjContext === null || ProductFilterObjContext === void 0 ? void 0 : (_ProductFilterObjCont = ProductFilterObjContext.FilterOptions) === null || _ProductFilterObjCont === void 0 ? void 0 : _ProductFilterObjCont.forEach(function (filteritem, filterindex) {
|
|
8370
|
+
tempinstfilters === null || tempinstfilters === void 0 ? void 0 : tempinstfilters.forEach(function (instfilteritem, instfilterindex) {
|
|
8371
|
+
var _instfilteritem$produ;
|
|
8372
|
+
instfilteritem === null || instfilteritem === void 0 ? void 0 : (_instfilteritem$produ = instfilteritem.productvaluesfilter) === null || _instfilteritem$produ === void 0 ? void 0 : _instfilteritem$produ.forEach(function (valefilteritem, valefilteritemindex) {
|
|
8369
8373
|
if (filteritem.valueid == valefilteritem.valueid) {
|
|
8370
8374
|
valefilteritem.isfilterselected = true;
|
|
8371
8375
|
}
|
|
@@ -8375,12 +8379,13 @@
|
|
|
8375
8379
|
setinstfilters(_toConsumableArray__default["default"](tempinstfilters));
|
|
8376
8380
|
}
|
|
8377
8381
|
if (instcollections.length != 0) {
|
|
8382
|
+
var _ProductFilterObjCont2;
|
|
8378
8383
|
var tempInstcollections = _toConsumableArray__default["default"](instcollections);
|
|
8379
8384
|
tempInstcollections.forEach(function (instfilteritem, valefilteritemindex) {
|
|
8380
8385
|
instfilteritem.isfilterselected = false;
|
|
8381
8386
|
});
|
|
8382
|
-
ProductFilterObjContext.collections.forEach(function (filteritem, filterindex) {
|
|
8383
|
-
tempInstcollections.forEach(function (instfilteritem, instfilterindex) {
|
|
8387
|
+
ProductFilterObjContext === null || ProductFilterObjContext === void 0 ? void 0 : (_ProductFilterObjCont2 = ProductFilterObjContext.collections) === null || _ProductFilterObjCont2 === void 0 ? void 0 : _ProductFilterObjCont2.forEach(function (filteritem, filterindex) {
|
|
8388
|
+
tempInstcollections === null || tempInstcollections === void 0 ? void 0 : tempInstcollections.forEach(function (instfilteritem, instfilterindex) {
|
|
8384
8389
|
if (instfilteritem.collectionid == filteritem) {
|
|
8385
8390
|
instfilteritem.isfilterselected = true;
|
|
8386
8391
|
}
|
|
@@ -8394,8 +8399,9 @@
|
|
|
8394
8399
|
if (type == 'clearfilters') {
|
|
8395
8400
|
tempfetchproductsfilerobjcontext.FilterOptions = [];
|
|
8396
8401
|
} else {
|
|
8402
|
+
var _tempfetchproductsfil;
|
|
8397
8403
|
var FilterExists = false;
|
|
8398
|
-
tempfetchproductsfilerobjcontext.FilterOptions.forEach(function (filteritem, filterindex) {
|
|
8404
|
+
tempfetchproductsfilerobjcontext === null || tempfetchproductsfilerobjcontext === void 0 ? void 0 : (_tempfetchproductsfil = tempfetchproductsfilerobjcontext.FilterOptions) === null || _tempfetchproductsfil === void 0 ? void 0 : _tempfetchproductsfil.forEach(function (filteritem, filterindex) {
|
|
8399
8405
|
if (filteritem.valueid == valueid) {
|
|
8400
8406
|
FilterExists = true;
|
|
8401
8407
|
tempfetchproductsfilerobjcontext.FilterOptions.splice(filterindex, 1);
|
|
@@ -8412,12 +8418,15 @@
|
|
|
8412
8418
|
} else {
|
|
8413
8419
|
tempfetchproductsfilerobjcontext.isfilter = 1;
|
|
8414
8420
|
}
|
|
8421
|
+
tempfetchproductsfilerobjcontext.page = 0;
|
|
8415
8422
|
setProductFilterObjContext(_objectSpread$1C({}, tempfetchproductsfilerobjcontext));
|
|
8423
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, encodeURIComponent(JSON.stringify(tempfetchproductsfilerobjcontext)));
|
|
8416
8424
|
};
|
|
8417
8425
|
var setCollectionFilterFunc = function setCollectionFilterFunc(collectionid) {
|
|
8426
|
+
var _tempfetchproductsfil2;
|
|
8418
8427
|
var tempfetchproductsfilerobjcontext = _objectSpread$1C({}, ProductFilterObjContext);
|
|
8419
8428
|
var CollectionExists = false;
|
|
8420
|
-
tempfetchproductsfilerobjcontext.collections.forEach(function (filteritem, filterindex) {
|
|
8429
|
+
tempfetchproductsfilerobjcontext === null || tempfetchproductsfilerobjcontext === void 0 ? void 0 : (_tempfetchproductsfil2 = tempfetchproductsfilerobjcontext.collections) === null || _tempfetchproductsfil2 === void 0 ? void 0 : _tempfetchproductsfil2.forEach(function (filteritem, filterindex) {
|
|
8421
8430
|
if (filteritem == collectionid) {
|
|
8422
8431
|
CollectionExists = true;
|
|
8423
8432
|
tempfetchproductsfilerobjcontext.collections.splice(filterindex, 1);
|
|
@@ -8426,7 +8435,9 @@
|
|
|
8426
8435
|
if (!CollectionExists) {
|
|
8427
8436
|
tempfetchproductsfilerobjcontext.collections.push(collectionid);
|
|
8428
8437
|
}
|
|
8438
|
+
tempfetchproductsfilerobjcontext.page = 0;
|
|
8429
8439
|
setProductFilterObjContext(_objectSpread$1C({}, tempfetchproductsfilerobjcontext));
|
|
8440
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, encodeURIComponent(JSON.stringify(tempfetchproductsfilerobjcontext)));
|
|
8430
8441
|
};
|
|
8431
8442
|
var filter_cssstyles = {
|
|
8432
8443
|
collapsetitle: glamor.css({
|
|
@@ -8668,7 +8679,9 @@
|
|
|
8668
8679
|
} else {
|
|
8669
8680
|
tempfetchproductsfilerobjcontext[item.payloadvalue] = valueitem.value;
|
|
8670
8681
|
}
|
|
8682
|
+
tempfetchproductsfilerobjcontext.page = 0;
|
|
8671
8683
|
setProductFilterObjContext(_objectSpread$1C({}, tempfetchproductsfilerobjcontext));
|
|
8684
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, encodeURIComponent(JSON.stringify(tempfetchproductsfilerobjcontext)));
|
|
8672
8685
|
}
|
|
8673
8686
|
}, /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
8674
8687
|
className: " ".concat(ischecked ? filter_cssstyles.btn_item_active : '', " ").concat(filterstyles.btn_item, " ").concat(filter_cssstyles.btn_item) + ' mb-2 d-flex align-items-center '
|
|
@@ -9132,6 +9145,15 @@
|
|
|
9132
9145
|
// }
|
|
9133
9146
|
// }, [inView]);
|
|
9134
9147
|
React.useEffect(function () {
|
|
9148
|
+
var productfilerobjtemp = ProductFilterObjContext;
|
|
9149
|
+
if (props.filterparamsprops != undefined) {
|
|
9150
|
+
var filterpar = decodeURIComponent(props.filterparamsprops);
|
|
9151
|
+
var filterparsed = JSON.parse(filterpar);
|
|
9152
|
+
if (filterparsed != undefined) {
|
|
9153
|
+
productfilerobjtemp = filterparsed;
|
|
9154
|
+
setProductFilterObjContext(filterparsed);
|
|
9155
|
+
}
|
|
9156
|
+
}
|
|
9135
9157
|
StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
|
|
9136
9158
|
if (sectionitem.sectionid == props.sectionidprops) {
|
|
9137
9159
|
var secpropobj = {};
|
|
@@ -9142,8 +9164,12 @@
|
|
|
9142
9164
|
setsectionproperties(_objectSpread$1B({}, secpropobj));
|
|
9143
9165
|
if (props.srcfromprops == 'GeneralProductsComponent') {
|
|
9144
9166
|
setfetchingtype('products');
|
|
9167
|
+
var lcproductfetchingtype = 'Random';
|
|
9168
|
+
if (productfilerobjtemp.ProductFetchingType != undefined && productfilerobjtemp.ProductFetchingType != null && productfilerobjtemp.ProductFetchingType.length != 0) {
|
|
9169
|
+
lcproductfetchingtype = productfilerobjtemp.ProductFetchingType;
|
|
9170
|
+
}
|
|
9145
9171
|
setProductsFetchingTypeSectionObj({
|
|
9146
|
-
productfetchingtype:
|
|
9172
|
+
productfetchingtype: lcproductfetchingtype,
|
|
9147
9173
|
collectionid: props.collectionidprops,
|
|
9148
9174
|
grouptype: props.grouptypeprops,
|
|
9149
9175
|
grouptyperefid: props.grouptyperefidprops
|
|
@@ -9201,7 +9227,9 @@
|
|
|
9201
9227
|
var tempfetchproductsfilerobjcontext = ProductFilterObjContext;
|
|
9202
9228
|
tempfetchproductsfilerobjcontext.ProductFetchingType = ProductsFetchingTypeSectionObj.productfetchingtype;
|
|
9203
9229
|
if (ProductsFetchingTypeSectionObj.grouptype == 'collections' || ProductsFetchingTypeSectionObj.grouptype == 'categories' || ProductsFetchingTypeSectionObj.grouptype == 'parentcollections') ; else {
|
|
9204
|
-
tempfetchproductsfilerobjcontext.collections
|
|
9230
|
+
if (tempfetchproductsfilerobjcontext.collections != undefined) {
|
|
9231
|
+
tempfetchproductsfilerobjcontext.collections.push(ProductsFetchingTypeSectionObj.collectionid);
|
|
9232
|
+
}
|
|
9205
9233
|
}
|
|
9206
9234
|
tempfetchproductsfilerobjcontext.grouptype = ProductsFetchingTypeSectionObj.grouptype;
|
|
9207
9235
|
tempfetchproductsfilerobjcontext.grouptyperefid = ProductsFetchingTypeSectionObj.grouptyperefid;
|
|
@@ -9430,16 +9458,24 @@
|
|
|
9430
9458
|
var tempProductFilterObjContext = _objectSpread$1B({}, ProductFilterObjContext);
|
|
9431
9459
|
tempProductFilterObjContext.page = event === null || event === void 0 ? void 0 : event.selected;
|
|
9432
9460
|
setProductFilterObjContext(_objectSpread$1B({}, tempProductFilterObjContext));
|
|
9461
|
+
var pasturl = '';
|
|
9462
|
+
if (props.grouptypeprops != undefined) {
|
|
9463
|
+
if (props.collectionidprops != undefined) {
|
|
9464
|
+
pasturl = props.grouptypeprops + '/' + props.collectionidprops + '/';
|
|
9465
|
+
}
|
|
9466
|
+
}
|
|
9467
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, pasturl + encodeURIComponent(JSON.stringify(tempProductFilterObjContext)));
|
|
9433
9468
|
};
|
|
9434
9469
|
function PaginatedItems(_ref) {
|
|
9435
9470
|
var _fetchProductsQuery$d7, _fetchProductsQuery$d8, _fetchProductsQuery$d9, _fetchProductsQuery$d10;
|
|
9436
9471
|
_ref.itemsPerPage;
|
|
9437
9472
|
// Here we use item offsets; we could also use page offsets
|
|
9438
9473
|
// following the API or data you're working with.
|
|
9439
|
-
|
|
9440
|
-
|
|
9441
|
-
|
|
9442
|
-
|
|
9474
|
+
// const [itemOffset, setItemOffset] = useState(0);
|
|
9475
|
+
// Simulate fetching items from another resources.
|
|
9476
|
+
// (This could be items from props; or items loaded in a local state
|
|
9477
|
+
// from an API endpoint with useEffect and useState)
|
|
9478
|
+
// const endOffset = itemOffset + itemsPerPage;
|
|
9443
9479
|
|
|
9444
9480
|
// const currentItems = items.slice(itemOffset, endOffset);
|
|
9445
9481
|
// const pageCount = Math.ceil(items.length / itemsPerPage);
|
|
@@ -9740,7 +9776,7 @@
|
|
|
9740
9776
|
if (ProductsFetchingTypeSectionObj.productfetchingtype == 'Collection') {
|
|
9741
9777
|
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, 'collections/' + ProductsFetchingTypeSectionObj.collectionid);
|
|
9742
9778
|
} else {
|
|
9743
|
-
routingcountext(StaticPagesLinksContext.GeneralProductsComponent,
|
|
9779
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, encodeURIComponent(JSON.stringify(ProductFilterObjContext)));
|
|
9744
9780
|
}
|
|
9745
9781
|
} else {
|
|
9746
9782
|
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, false);
|
package/package.json
CHANGED
package/src.zip
ADDED
|
Binary file
|
package/{
DELETED
|
File without changes
|