tabexseriescomponents 0.0.175 → 0.0.176
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{npmpackage.zip → 20-10YoussefLibrary.zip} +0 -0
- package/LibraryYoussef7-11.zip +0 -0
- package/dist/index.cjs.js +42 -13
- package/dist/index.esm.js +42 -13
- package/dist/index.umd.js +42 -13
- package/package.json +1 -1
- package/src.zip +0 -0
- package/{ +0 -0
|
Binary file
|
|
Binary file
|
package/dist/index.cjs.js
CHANGED
|
@@ -8435,6 +8435,8 @@ var Filter$1 = function Filter(props) {
|
|
|
8435
8435
|
var ProductFilterObjContext = props.actions.ProductFilterObjContext;
|
|
8436
8436
|
var setProductFilterObjContext = props.actions.setProductFilterObjContext;
|
|
8437
8437
|
var authdetailsContext = props.actions.authdetailsContext;
|
|
8438
|
+
var routingcountext = props.actions.routingcountext;
|
|
8439
|
+
var StaticPagesLinksContext = props.actions.StaticPagesLinksContext;
|
|
8438
8440
|
var _useState = React.useState(''),
|
|
8439
8441
|
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
8440
8442
|
sectionproperties = _useState2[0],
|
|
@@ -8496,15 +8498,17 @@ var Filter$1 = function Filter(props) {
|
|
|
8496
8498
|
}, [ProductFilterObjContext]);
|
|
8497
8499
|
var filterupdater = function filterupdater() {
|
|
8498
8500
|
if (instfilters.length != 0) {
|
|
8501
|
+
var _ProductFilterObjCont;
|
|
8499
8502
|
var tempinstfilters = _toConsumableArray__default["default"](instfilters);
|
|
8500
|
-
tempinstfilters.forEach(function (instfilteritem, instfilterindex) {
|
|
8503
|
+
tempinstfilters === null || tempinstfilters === void 0 ? void 0 : tempinstfilters.forEach(function (instfilteritem, instfilterindex) {
|
|
8501
8504
|
instfilteritem.productvaluesfilter.forEach(function (valefilteritem, valefilteritemindex) {
|
|
8502
8505
|
valefilteritem.isfilterselected = false;
|
|
8503
8506
|
});
|
|
8504
8507
|
});
|
|
8505
|
-
ProductFilterObjContext.FilterOptions.forEach(function (filteritem, filterindex) {
|
|
8506
|
-
tempinstfilters.forEach(function (instfilteritem, instfilterindex) {
|
|
8507
|
-
|
|
8508
|
+
ProductFilterObjContext === null || ProductFilterObjContext === void 0 ? void 0 : (_ProductFilterObjCont = ProductFilterObjContext.FilterOptions) === null || _ProductFilterObjCont === void 0 ? void 0 : _ProductFilterObjCont.forEach(function (filteritem, filterindex) {
|
|
8509
|
+
tempinstfilters === null || tempinstfilters === void 0 ? void 0 : tempinstfilters.forEach(function (instfilteritem, instfilterindex) {
|
|
8510
|
+
var _instfilteritem$produ;
|
|
8511
|
+
instfilteritem === null || instfilteritem === void 0 ? void 0 : (_instfilteritem$produ = instfilteritem.productvaluesfilter) === null || _instfilteritem$produ === void 0 ? void 0 : _instfilteritem$produ.forEach(function (valefilteritem, valefilteritemindex) {
|
|
8508
8512
|
if (filteritem.valueid == valefilteritem.valueid) {
|
|
8509
8513
|
valefilteritem.isfilterselected = true;
|
|
8510
8514
|
}
|
|
@@ -8514,12 +8518,13 @@ var Filter$1 = function Filter(props) {
|
|
|
8514
8518
|
setinstfilters(_toConsumableArray__default["default"](tempinstfilters));
|
|
8515
8519
|
}
|
|
8516
8520
|
if (instcollections.length != 0) {
|
|
8521
|
+
var _ProductFilterObjCont2;
|
|
8517
8522
|
var tempInstcollections = _toConsumableArray__default["default"](instcollections);
|
|
8518
8523
|
tempInstcollections.forEach(function (instfilteritem, valefilteritemindex) {
|
|
8519
8524
|
instfilteritem.isfilterselected = false;
|
|
8520
8525
|
});
|
|
8521
|
-
ProductFilterObjContext.collections.forEach(function (filteritem, filterindex) {
|
|
8522
|
-
tempInstcollections.forEach(function (instfilteritem, instfilterindex) {
|
|
8526
|
+
ProductFilterObjContext === null || ProductFilterObjContext === void 0 ? void 0 : (_ProductFilterObjCont2 = ProductFilterObjContext.collections) === null || _ProductFilterObjCont2 === void 0 ? void 0 : _ProductFilterObjCont2.forEach(function (filteritem, filterindex) {
|
|
8527
|
+
tempInstcollections === null || tempInstcollections === void 0 ? void 0 : tempInstcollections.forEach(function (instfilteritem, instfilterindex) {
|
|
8523
8528
|
if (instfilteritem.collectionid == filteritem) {
|
|
8524
8529
|
instfilteritem.isfilterselected = true;
|
|
8525
8530
|
}
|
|
@@ -8533,8 +8538,9 @@ var Filter$1 = function Filter(props) {
|
|
|
8533
8538
|
if (type == 'clearfilters') {
|
|
8534
8539
|
tempfetchproductsfilerobjcontext.FilterOptions = [];
|
|
8535
8540
|
} else {
|
|
8541
|
+
var _tempfetchproductsfil;
|
|
8536
8542
|
var FilterExists = false;
|
|
8537
|
-
tempfetchproductsfilerobjcontext.FilterOptions.forEach(function (filteritem, filterindex) {
|
|
8543
|
+
tempfetchproductsfilerobjcontext === null || tempfetchproductsfilerobjcontext === void 0 ? void 0 : (_tempfetchproductsfil = tempfetchproductsfilerobjcontext.FilterOptions) === null || _tempfetchproductsfil === void 0 ? void 0 : _tempfetchproductsfil.forEach(function (filteritem, filterindex) {
|
|
8538
8544
|
if (filteritem.valueid == valueid) {
|
|
8539
8545
|
FilterExists = true;
|
|
8540
8546
|
tempfetchproductsfilerobjcontext.FilterOptions.splice(filterindex, 1);
|
|
@@ -8551,12 +8557,15 @@ var Filter$1 = function Filter(props) {
|
|
|
8551
8557
|
} else {
|
|
8552
8558
|
tempfetchproductsfilerobjcontext.isfilter = 1;
|
|
8553
8559
|
}
|
|
8560
|
+
tempfetchproductsfilerobjcontext.page = 0;
|
|
8554
8561
|
setProductFilterObjContext(_objectSpread$1C({}, tempfetchproductsfilerobjcontext));
|
|
8562
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, encodeURIComponent(JSON.stringify(tempfetchproductsfilerobjcontext)));
|
|
8555
8563
|
};
|
|
8556
8564
|
var setCollectionFilterFunc = function setCollectionFilterFunc(collectionid) {
|
|
8565
|
+
var _tempfetchproductsfil2;
|
|
8557
8566
|
var tempfetchproductsfilerobjcontext = _objectSpread$1C({}, ProductFilterObjContext);
|
|
8558
8567
|
var CollectionExists = false;
|
|
8559
|
-
tempfetchproductsfilerobjcontext.collections.forEach(function (filteritem, filterindex) {
|
|
8568
|
+
tempfetchproductsfilerobjcontext === null || tempfetchproductsfilerobjcontext === void 0 ? void 0 : (_tempfetchproductsfil2 = tempfetchproductsfilerobjcontext.collections) === null || _tempfetchproductsfil2 === void 0 ? void 0 : _tempfetchproductsfil2.forEach(function (filteritem, filterindex) {
|
|
8560
8569
|
if (filteritem == collectionid) {
|
|
8561
8570
|
CollectionExists = true;
|
|
8562
8571
|
tempfetchproductsfilerobjcontext.collections.splice(filterindex, 1);
|
|
@@ -8565,7 +8574,9 @@ var Filter$1 = function Filter(props) {
|
|
|
8565
8574
|
if (!CollectionExists) {
|
|
8566
8575
|
tempfetchproductsfilerobjcontext.collections.push(collectionid);
|
|
8567
8576
|
}
|
|
8577
|
+
tempfetchproductsfilerobjcontext.page = 0;
|
|
8568
8578
|
setProductFilterObjContext(_objectSpread$1C({}, tempfetchproductsfilerobjcontext));
|
|
8579
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, encodeURIComponent(JSON.stringify(tempfetchproductsfilerobjcontext)));
|
|
8569
8580
|
};
|
|
8570
8581
|
var filter_cssstyles = {
|
|
8571
8582
|
collapsetitle: glamor.css({
|
|
@@ -8808,6 +8819,7 @@ var Filter$1 = function Filter(props) {
|
|
|
8808
8819
|
tempfetchproductsfilerobjcontext[item.payloadvalue] = valueitem.value;
|
|
8809
8820
|
}
|
|
8810
8821
|
setProductFilterObjContext(_objectSpread$1C({}, tempfetchproductsfilerobjcontext));
|
|
8822
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, encodeURIComponent(JSON.stringify(tempfetchproductsfilerobjcontext)));
|
|
8811
8823
|
}
|
|
8812
8824
|
}, /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
8813
8825
|
className: " ".concat(ischecked ? filter_cssstyles.btn_item_active : '', " ").concat(filterstyles.btn_item, " ").concat(filter_cssstyles.btn_item) + ' mb-2 d-flex align-items-center '
|
|
@@ -9271,6 +9283,13 @@ var CardsSection = function CardsSection(props) {
|
|
|
9271
9283
|
// }
|
|
9272
9284
|
// }, [inView]);
|
|
9273
9285
|
React.useEffect(function () {
|
|
9286
|
+
if (props.filterparamsprops != undefined) {
|
|
9287
|
+
var filterpar = decodeURIComponent(props.filterparamsprops);
|
|
9288
|
+
var filterparsed = JSON.parse(filterpar);
|
|
9289
|
+
if (filterparsed != undefined) {
|
|
9290
|
+
setProductFilterObjContext(filterparsed);
|
|
9291
|
+
}
|
|
9292
|
+
}
|
|
9274
9293
|
StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
|
|
9275
9294
|
if (sectionitem.sectionid == props.sectionidprops) {
|
|
9276
9295
|
var secpropobj = {};
|
|
@@ -9340,7 +9359,9 @@ var CardsSection = function CardsSection(props) {
|
|
|
9340
9359
|
var tempfetchproductsfilerobjcontext = ProductFilterObjContext;
|
|
9341
9360
|
tempfetchproductsfilerobjcontext.ProductFetchingType = ProductsFetchingTypeSectionObj.productfetchingtype;
|
|
9342
9361
|
if (ProductsFetchingTypeSectionObj.grouptype == 'collections' || ProductsFetchingTypeSectionObj.grouptype == 'categories' || ProductsFetchingTypeSectionObj.grouptype == 'parentcollections') ; else {
|
|
9343
|
-
tempfetchproductsfilerobjcontext.collections
|
|
9362
|
+
if (tempfetchproductsfilerobjcontext.collections != undefined) {
|
|
9363
|
+
tempfetchproductsfilerobjcontext.collections.push(ProductsFetchingTypeSectionObj.collectionid);
|
|
9364
|
+
}
|
|
9344
9365
|
}
|
|
9345
9366
|
tempfetchproductsfilerobjcontext.grouptype = ProductsFetchingTypeSectionObj.grouptype;
|
|
9346
9367
|
tempfetchproductsfilerobjcontext.grouptyperefid = ProductsFetchingTypeSectionObj.grouptyperefid;
|
|
@@ -9569,16 +9590,24 @@ var CardsSection = function CardsSection(props) {
|
|
|
9569
9590
|
var tempProductFilterObjContext = _objectSpread$1B({}, ProductFilterObjContext);
|
|
9570
9591
|
tempProductFilterObjContext.page = event === null || event === void 0 ? void 0 : event.selected;
|
|
9571
9592
|
setProductFilterObjContext(_objectSpread$1B({}, tempProductFilterObjContext));
|
|
9593
|
+
var pasturl = '';
|
|
9594
|
+
if (props.grouptypeprops != undefined) {
|
|
9595
|
+
if (props.collectionidprops != undefined) {
|
|
9596
|
+
pasturl = props.grouptypeprops + '/' + props.collectionidprops + '/';
|
|
9597
|
+
}
|
|
9598
|
+
}
|
|
9599
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, pasturl + encodeURIComponent(JSON.stringify(tempProductFilterObjContext)));
|
|
9572
9600
|
};
|
|
9573
9601
|
function PaginatedItems(_ref) {
|
|
9574
9602
|
var _fetchProductsQuery$d7, _fetchProductsQuery$d8, _fetchProductsQuery$d9, _fetchProductsQuery$d10;
|
|
9575
9603
|
_ref.itemsPerPage;
|
|
9576
9604
|
// Here we use item offsets; we could also use page offsets
|
|
9577
9605
|
// following the API or data you're working with.
|
|
9578
|
-
|
|
9579
|
-
|
|
9580
|
-
|
|
9581
|
-
|
|
9606
|
+
// const [itemOffset, setItemOffset] = useState(0);
|
|
9607
|
+
// Simulate fetching items from another resources.
|
|
9608
|
+
// (This could be items from props; or items loaded in a local state
|
|
9609
|
+
// from an API endpoint with useEffect and useState)
|
|
9610
|
+
// const endOffset = itemOffset + itemsPerPage;
|
|
9582
9611
|
|
|
9583
9612
|
// const currentItems = items.slice(itemOffset, endOffset);
|
|
9584
9613
|
// const pageCount = Math.ceil(items.length / itemsPerPage);
|
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({
|
|
@@ -8764,6 +8775,7 @@ var Filter$1 = function Filter(props) {
|
|
|
8764
8775
|
tempfetchproductsfilerobjcontext[item.payloadvalue] = valueitem.value;
|
|
8765
8776
|
}
|
|
8766
8777
|
setProductFilterObjContext(_objectSpread$1C({}, tempfetchproductsfilerobjcontext));
|
|
8778
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, encodeURIComponent(JSON.stringify(tempfetchproductsfilerobjcontext)));
|
|
8767
8779
|
}
|
|
8768
8780
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
8769
8781
|
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 +9239,13 @@ var CardsSection = function CardsSection(props) {
|
|
|
9227
9239
|
// }
|
|
9228
9240
|
// }, [inView]);
|
|
9229
9241
|
useEffect(function () {
|
|
9242
|
+
if (props.filterparamsprops != undefined) {
|
|
9243
|
+
var filterpar = decodeURIComponent(props.filterparamsprops);
|
|
9244
|
+
var filterparsed = JSON.parse(filterpar);
|
|
9245
|
+
if (filterparsed != undefined) {
|
|
9246
|
+
setProductFilterObjContext(filterparsed);
|
|
9247
|
+
}
|
|
9248
|
+
}
|
|
9230
9249
|
StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
|
|
9231
9250
|
if (sectionitem.sectionid == props.sectionidprops) {
|
|
9232
9251
|
var secpropobj = {};
|
|
@@ -9296,7 +9315,9 @@ var CardsSection = function CardsSection(props) {
|
|
|
9296
9315
|
var tempfetchproductsfilerobjcontext = ProductFilterObjContext;
|
|
9297
9316
|
tempfetchproductsfilerobjcontext.ProductFetchingType = ProductsFetchingTypeSectionObj.productfetchingtype;
|
|
9298
9317
|
if (ProductsFetchingTypeSectionObj.grouptype == 'collections' || ProductsFetchingTypeSectionObj.grouptype == 'categories' || ProductsFetchingTypeSectionObj.grouptype == 'parentcollections') ; else {
|
|
9299
|
-
tempfetchproductsfilerobjcontext.collections
|
|
9318
|
+
if (tempfetchproductsfilerobjcontext.collections != undefined) {
|
|
9319
|
+
tempfetchproductsfilerobjcontext.collections.push(ProductsFetchingTypeSectionObj.collectionid);
|
|
9320
|
+
}
|
|
9300
9321
|
}
|
|
9301
9322
|
tempfetchproductsfilerobjcontext.grouptype = ProductsFetchingTypeSectionObj.grouptype;
|
|
9302
9323
|
tempfetchproductsfilerobjcontext.grouptyperefid = ProductsFetchingTypeSectionObj.grouptyperefid;
|
|
@@ -9525,16 +9546,24 @@ var CardsSection = function CardsSection(props) {
|
|
|
9525
9546
|
var tempProductFilterObjContext = _objectSpread$1B({}, ProductFilterObjContext);
|
|
9526
9547
|
tempProductFilterObjContext.page = event === null || event === void 0 ? void 0 : event.selected;
|
|
9527
9548
|
setProductFilterObjContext(_objectSpread$1B({}, tempProductFilterObjContext));
|
|
9549
|
+
var pasturl = '';
|
|
9550
|
+
if (props.grouptypeprops != undefined) {
|
|
9551
|
+
if (props.collectionidprops != undefined) {
|
|
9552
|
+
pasturl = props.grouptypeprops + '/' + props.collectionidprops + '/';
|
|
9553
|
+
}
|
|
9554
|
+
}
|
|
9555
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, pasturl + encodeURIComponent(JSON.stringify(tempProductFilterObjContext)));
|
|
9528
9556
|
};
|
|
9529
9557
|
function PaginatedItems(_ref) {
|
|
9530
9558
|
var _fetchProductsQuery$d7, _fetchProductsQuery$d8, _fetchProductsQuery$d9, _fetchProductsQuery$d10;
|
|
9531
9559
|
_ref.itemsPerPage;
|
|
9532
9560
|
// Here we use item offsets; we could also use page offsets
|
|
9533
9561
|
// following the API or data you're working with.
|
|
9534
|
-
|
|
9535
|
-
|
|
9536
|
-
|
|
9537
|
-
|
|
9562
|
+
// const [itemOffset, setItemOffset] = useState(0);
|
|
9563
|
+
// Simulate fetching items from another resources.
|
|
9564
|
+
// (This could be items from props; or items loaded in a local state
|
|
9565
|
+
// from an API endpoint with useEffect and useState)
|
|
9566
|
+
// const endOffset = itemOffset + itemsPerPage;
|
|
9538
9567
|
|
|
9539
9568
|
// const currentItems = items.slice(itemOffset, endOffset);
|
|
9540
9569
|
// const pageCount = Math.ceil(items.length / itemsPerPage);
|
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({
|
|
@@ -8669,6 +8680,7 @@
|
|
|
8669
8680
|
tempfetchproductsfilerobjcontext[item.payloadvalue] = valueitem.value;
|
|
8670
8681
|
}
|
|
8671
8682
|
setProductFilterObjContext(_objectSpread$1C({}, tempfetchproductsfilerobjcontext));
|
|
8683
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, encodeURIComponent(JSON.stringify(tempfetchproductsfilerobjcontext)));
|
|
8672
8684
|
}
|
|
8673
8685
|
}, /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
8674
8686
|
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 +9144,13 @@
|
|
|
9132
9144
|
// }
|
|
9133
9145
|
// }, [inView]);
|
|
9134
9146
|
React.useEffect(function () {
|
|
9147
|
+
if (props.filterparamsprops != undefined) {
|
|
9148
|
+
var filterpar = decodeURIComponent(props.filterparamsprops);
|
|
9149
|
+
var filterparsed = JSON.parse(filterpar);
|
|
9150
|
+
if (filterparsed != undefined) {
|
|
9151
|
+
setProductFilterObjContext(filterparsed);
|
|
9152
|
+
}
|
|
9153
|
+
}
|
|
9135
9154
|
StatePagePropertiesContext.pageobj.sections.forEach(function (sectionitem, sectionindex) {
|
|
9136
9155
|
if (sectionitem.sectionid == props.sectionidprops) {
|
|
9137
9156
|
var secpropobj = {};
|
|
@@ -9201,7 +9220,9 @@
|
|
|
9201
9220
|
var tempfetchproductsfilerobjcontext = ProductFilterObjContext;
|
|
9202
9221
|
tempfetchproductsfilerobjcontext.ProductFetchingType = ProductsFetchingTypeSectionObj.productfetchingtype;
|
|
9203
9222
|
if (ProductsFetchingTypeSectionObj.grouptype == 'collections' || ProductsFetchingTypeSectionObj.grouptype == 'categories' || ProductsFetchingTypeSectionObj.grouptype == 'parentcollections') ; else {
|
|
9204
|
-
tempfetchproductsfilerobjcontext.collections
|
|
9223
|
+
if (tempfetchproductsfilerobjcontext.collections != undefined) {
|
|
9224
|
+
tempfetchproductsfilerobjcontext.collections.push(ProductsFetchingTypeSectionObj.collectionid);
|
|
9225
|
+
}
|
|
9205
9226
|
}
|
|
9206
9227
|
tempfetchproductsfilerobjcontext.grouptype = ProductsFetchingTypeSectionObj.grouptype;
|
|
9207
9228
|
tempfetchproductsfilerobjcontext.grouptyperefid = ProductsFetchingTypeSectionObj.grouptyperefid;
|
|
@@ -9430,16 +9451,24 @@
|
|
|
9430
9451
|
var tempProductFilterObjContext = _objectSpread$1B({}, ProductFilterObjContext);
|
|
9431
9452
|
tempProductFilterObjContext.page = event === null || event === void 0 ? void 0 : event.selected;
|
|
9432
9453
|
setProductFilterObjContext(_objectSpread$1B({}, tempProductFilterObjContext));
|
|
9454
|
+
var pasturl = '';
|
|
9455
|
+
if (props.grouptypeprops != undefined) {
|
|
9456
|
+
if (props.collectionidprops != undefined) {
|
|
9457
|
+
pasturl = props.grouptypeprops + '/' + props.collectionidprops + '/';
|
|
9458
|
+
}
|
|
9459
|
+
}
|
|
9460
|
+
routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, pasturl + encodeURIComponent(JSON.stringify(tempProductFilterObjContext)));
|
|
9433
9461
|
};
|
|
9434
9462
|
function PaginatedItems(_ref) {
|
|
9435
9463
|
var _fetchProductsQuery$d7, _fetchProductsQuery$d8, _fetchProductsQuery$d9, _fetchProductsQuery$d10;
|
|
9436
9464
|
_ref.itemsPerPage;
|
|
9437
9465
|
// Here we use item offsets; we could also use page offsets
|
|
9438
9466
|
// following the API or data you're working with.
|
|
9439
|
-
|
|
9440
|
-
|
|
9441
|
-
|
|
9442
|
-
|
|
9467
|
+
// const [itemOffset, setItemOffset] = useState(0);
|
|
9468
|
+
// Simulate fetching items from another resources.
|
|
9469
|
+
// (This could be items from props; or items loaded in a local state
|
|
9470
|
+
// from an API endpoint with useEffect and useState)
|
|
9471
|
+
// const endOffset = itemOffset + itemsPerPage;
|
|
9443
9472
|
|
|
9444
9473
|
// const currentItems = items.slice(itemOffset, endOffset);
|
|
9445
9474
|
// const pageCount = Math.ceil(items.length / itemsPerPage);
|
package/package.json
CHANGED
package/src.zip
ADDED
|
Binary file
|
package/{
DELETED
|
File without changes
|