tabexseriescomponents 0.2.1190 → 0.2.1192

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.esm.js CHANGED
@@ -16222,7 +16222,7 @@ var Select$2 = /*#__PURE__*/React.lazy(function () {
16222
16222
  return import('react-select');
16223
16223
  });
16224
16224
  var CustomerInformationForm = function CustomerInformationForm(props) {
16225
- var _fetchAuthorizationQu, _fetchAuthorizationQu2, _fetchAuthorizationQu3, _css, _authdetailsContext$i1, _authdetailsContext$c, _authdetailsContext$c2;
16225
+ var _fetchAuthorizationQu, _fetchAuthorizationQu2, _fetchAuthorizationQu3, _css, _authdetailsContext$i10, _authdetailsContext$c, _authdetailsContext$c2;
16226
16226
  var lang = props.actions.lang;
16227
16227
  var langdetect = props.actions.langdetect;
16228
16228
  props.actions.routingcountext;
@@ -16589,7 +16589,7 @@ var CustomerInformationForm = function CustomerInformationForm(props) {
16589
16589
  })
16590
16590
  };
16591
16591
  var PersonalInformation = function PersonalInformation() {
16592
- var _authdetailsContext$i2, _authdetailsContext$i3, _authdetailsContext$i4, _authdetailsContext$i5;
16592
+ var _authdetailsContext$i2, _authdetailsContext$i3, _authdetailsContext$i4, _authdetailsContext$i5, _authdetailsContext$i6;
16593
16593
  return /*#__PURE__*/React.createElement("div", {
16594
16594
  className: "row m-0 w-100"
16595
16595
  }, /*#__PURE__*/React.createElement("div", {
@@ -16644,6 +16644,7 @@ var CustomerInformationForm = function CustomerInformationForm(props) {
16644
16644
  inputStyle: {
16645
16645
  color: sectionproperties.inputfieldcolor
16646
16646
  },
16647
+ disableDropdown: (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i6 = authdetailsContext.instinfo) === null || _authdetailsContext$i6 === void 0 ? void 0 : _authdetailsContext$i6.contactinfo.instid) == '69551bc6d17c5' ? true : false,
16647
16648
  onChange: function onChange(event, country) {
16648
16649
  var temp = _objectSpread$2u({}, payloadobj);
16649
16650
  temp.mobile = event;
@@ -16948,7 +16949,7 @@ var CustomerInformationForm = function CustomerInformationForm(props) {
16948
16949
  return /*#__PURE__*/React.createElement("div", {
16949
16950
  className: "row m-0 w-100"
16950
16951
  }, payloadobj.instsignupformvalues.length != 0 && /*#__PURE__*/React.createElement(React.Fragment, null, payloadobj.instsignupformvalues.map(function (item, index) {
16951
- var _authdetailsContext$i6, _authdetailsContext$i7, _authdetailsContext$i8, _authdetailsContext$i9, _authdetailsContext$i0;
16952
+ var _authdetailsContext$i7, _authdetailsContext$i8, _authdetailsContext$i9, _authdetailsContext$i0, _authdetailsContext$i1;
16952
16953
  return /*#__PURE__*/React.createElement("div", {
16953
16954
  className: sectionproperties.cardstyletype == 'Style 1' ? 'col-lg-6 col-md-12 col-sm-12 mb-4 p-sm-0' : 'col-lg-12 col-md-12 col-sm-12 mb-4 p-sm-0'
16954
16955
  }, item.inputtype != 'checkbox' && /*#__PURE__*/React.createElement("label", {
@@ -16970,7 +16971,7 @@ var CustomerInformationForm = function CustomerInformationForm(props) {
16970
16971
  style: {
16971
16972
  background: sectionproperties.input_bgcolor
16972
16973
  },
16973
- readOnly: (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i6 = authdetailsContext.instinfo) === null || _authdetailsContext$i6 === void 0 ? void 0 : _authdetailsContext$i6.contactinfo.instid) == '68527dfef348b' ? true : false
16974
+ readOnly: (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i7 = authdetailsContext.instinfo) === null || _authdetailsContext$i7 === void 0 ? void 0 : _authdetailsContext$i7.contactinfo.instid) == '68527dfef348b' ? true : false
16974
16975
  }), item.inputtype == 'checkbox' && /*#__PURE__*/React.createElement("label", {
16975
16976
  className: langdetect == 'en' ? "".concat(loginstyles.checkbox, " ").concat(formstyles.checkbox, " ") + ' d-flex mb-0 ' : "".concat(loginstyles.checkbox, " ").concat(loginstyles.checkboxtranslated) + ' d-flex mb-0 ',
16976
16977
  "for": "codcheckbox"
@@ -17025,11 +17026,11 @@ var CustomerInformationForm = function CustomerInformationForm(props) {
17025
17026
  },
17026
17027
  style: {
17027
17028
  resize: 'none',
17028
- paddingTop: (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i7 = authdetailsContext.instinfo) === null || _authdetailsContext$i7 === void 0 ? void 0 : _authdetailsContext$i7.contactinfo.instid) == '68527dfef348b' ? 10 : 0,
17029
- paddingLeft: (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i8 = authdetailsContext.instinfo) === null || _authdetailsContext$i8 === void 0 ? void 0 : _authdetailsContext$i8.contactinfo.instid) == '68527dfef348b' ? 20 : 0,
17030
- paddingRight: (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i9 = authdetailsContext.instinfo) === null || _authdetailsContext$i9 === void 0 ? void 0 : _authdetailsContext$i9.contactinfo.instid) == '68527dfef348b' ? 20 : 0
17029
+ paddingTop: (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i8 = authdetailsContext.instinfo) === null || _authdetailsContext$i8 === void 0 ? void 0 : _authdetailsContext$i8.contactinfo.instid) == '68527dfef348b' ? 10 : 0,
17030
+ paddingLeft: (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i9 = authdetailsContext.instinfo) === null || _authdetailsContext$i9 === void 0 ? void 0 : _authdetailsContext$i9.contactinfo.instid) == '68527dfef348b' ? 20 : 0,
17031
+ paddingRight: (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i0 = authdetailsContext.instinfo) === null || _authdetailsContext$i0 === void 0 ? void 0 : _authdetailsContext$i0.contactinfo.instid) == '68527dfef348b' ? 20 : 0
17031
17032
  },
17032
- disabled: (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i0 = authdetailsContext.instinfo) === null || _authdetailsContext$i0 === void 0 ? void 0 : _authdetailsContext$i0.contactinfo.instid) == '68527dfef348b' ? true : false
17033
+ disabled: (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i1 = authdetailsContext.instinfo) === null || _authdetailsContext$i1 === void 0 ? void 0 : _authdetailsContext$i1.contactinfo.instid) == '68527dfef348b' ? true : false
17033
17034
  }), /*#__PURE__*/React.createElement("span", {
17034
17035
  className: loginstyles.login_input_focus
17035
17036
  })));
@@ -17094,7 +17095,7 @@ var CustomerInformationForm = function CustomerInformationForm(props) {
17094
17095
  style: {
17095
17096
  background: sectionproperties.formLeftbgColor
17096
17097
  }
17097
- }, PersonalInformation(), Address(), Otherinformation(), sectionproperties.hidepassword == 'Show' && (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i1 = authdetailsContext.instinfo) === null || _authdetailsContext$i1 === void 0 ? void 0 : _authdetailsContext$i1.ispasswordrequired_signup) == 1 && Password()), dataloaded && props.srcfromprops == 'accountinfo' && /*#__PURE__*/React.createElement("div", {
17098
+ }, PersonalInformation(), Address(), Otherinformation(), sectionproperties.hidepassword == 'Show' && (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i10 = authdetailsContext.instinfo) === null || _authdetailsContext$i10 === void 0 ? void 0 : _authdetailsContext$i10.ispasswordrequired_signup) == 1 && Password()), dataloaded && props.srcfromprops == 'accountinfo' && /*#__PURE__*/React.createElement("div", {
17098
17099
  className: "col-lg-12 p-0"
17099
17100
  }, /*#__PURE__*/React.createElement("div", {
17100
17101
  className: "row ml-0 mr-0 w-100"
@@ -22843,205 +22844,533 @@ var Filter$1 = function Filter(props) {
22843
22844
  function ownKeys$2l(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
22844
22845
  function _objectSpread$2l(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2l(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2l(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
22845
22846
  var CollectionsFilterHorizontal = function CollectionsFilterHorizontal(props) {
22846
- props.actions.lang;
22847
+ var _css;
22848
+ var FetchAllVendorsQuery = props.actions.FetchAllVendorsQuery;
22849
+ var lang = props.actions.lang;
22847
22850
  var langdetect = props.actions.langdetect;
22848
22851
  props.actions.productfiltercontext;
22849
22852
  props.actions.setproductfiltercontext;
22850
22853
  var ProductFilterObjContext = props.actions.ProductFilterObjContext;
22851
22854
  var setProductFilterObjContext = props.actions.setProductFilterObjContext;
22852
- props.actions.authdetailsContext;
22855
+ var authdetailsContext = props.actions.authdetailsContext;
22856
+ var fetchproductoptionsQueryContext = props.actions.fetchproductoptionsQueryContext;
22857
+ var fetchCategoriesQueryContext = props.actions.fetchCategoriesQueryContext;
22853
22858
  var routingcountext = props.actions.routingcountext;
22859
+ var fetchcollectionsQueryContext = props.actions.fetchcollectionsQueryContext;
22854
22860
  var StaticPagesLinksContext = props.actions.StaticPagesLinksContext;
22855
- props.actions.ikimagecredcontext;
22856
- props.actions.FetchQueriesEngineContext;
22857
- props.actions.setFetchQueriesEngineContext;
22858
- props.actions.fetchcollectionsQueryContext;
22859
- var fetchCategoriesQueryContext = props.actions.fetchCategoriesQueryContext;
22860
- var _useState = useState(''),
22861
- _useState2 = _slicedToArray(_useState, 2),
22862
- sectionproperties = _useState2[0],
22863
- setsectionproperties = _useState2[1];
22864
- var _useState3 = useState([]),
22865
- _useState4 = _slicedToArray(_useState3, 2);
22866
- _useState4[0];
22861
+ var ikimagecredcontext = props.actions.ikimagecredcontext;
22862
+ var _useState = useState({
22863
+ min: 0,
22864
+ max: 10000
22865
+ }),
22866
+ _useState2 = _slicedToArray(_useState, 2);
22867
+ _useState2[0];
22868
+ _useState2[1];
22869
+ var _useState3 = useState({
22870
+ min: '',
22871
+ max: ''
22872
+ }),
22873
+ _useState4 = _slicedToArray(_useState3, 2),
22874
+ pricevalue2 = _useState4[0];
22867
22875
  _useState4[1];
22868
- // const [instcollections, setinstcollections] = useState([...fetchcollectionsQueryContext?.data?.data?.collections]);
22869
22876
  var _useState5 = useState([]),
22870
22877
  _useState6 = _slicedToArray(_useState5, 2),
22871
- instcategories = _useState6[0],
22872
- setinstcategories = _useState6[1];
22873
- var _useState7 = useState(false),
22874
- _useState8 = _slicedToArray(_useState7, 2);
22875
- _useState8[0];
22876
- _useState8[1];
22878
+ productfeatuesarr = _useState6[0];
22879
+ _useState6[1];
22880
+ var _useState7 = useState([]),
22881
+ _useState8 = _slicedToArray(_useState7, 2),
22882
+ vendorarr = _useState8[0],
22883
+ setvendorsarr = _useState8[1];
22884
+ props.actions.fetchTabexCountriesQueryContext;
22885
+ var FetchQueriesEngineContext = props.actions.FetchQueriesEngineContext;
22886
+ var setFetchQueriesEngineContext = props.actions.setFetchQueriesEngineContext;
22887
+ props.actions.fetchTabexCitiesQueryContext;
22888
+ var fetchTabexStatesQueryContext = props.actions.fetchTabexStatesQueryContext;
22889
+ var FetchTabexStatesPayloadobjContext = props.actions.FetchTabexStatesPayloadobjContext;
22890
+ var setFetchTabexStatesPayloadobjContext = props.actions.setFetchTabexStatesPayloadobjContext;
22891
+ props.actions.fetchProductFeaturesQueryContext;
22892
+ var _useState9 = useState(''),
22893
+ _useState0 = _slicedToArray(_useState9, 2),
22894
+ sectionproperties = _useState0[0],
22895
+ setsectionproperties = _useState0[1];
22896
+ // const [instfilters, setinstfilters] = useState([...authdetailsContext.instinfo.instfilters]);
22897
+ var _useState1 = useState([]),
22898
+ _useState10 = _slicedToArray(_useState1, 2),
22899
+ instfilters = _useState10[0],
22900
+ setinstfilters = _useState10[1];
22901
+ var _useState11 = useState([]),
22902
+ _useState12 = _slicedToArray(_useState11, 2),
22903
+ collectionstobevisible = _useState12[0],
22904
+ setcollectionstobevisible = _useState12[1];
22905
+ var _useState13 = useState([]),
22906
+ _useState14 = _slicedToArray(_useState13, 2),
22907
+ portfoliocollectionstobevisible = _useState14[0],
22908
+ setportfoliocollectionstobevisible = _useState14[1];
22909
+ var _useState15 = useState([]),
22910
+ _useState16 = _slicedToArray(_useState15, 2),
22911
+ instcollections = _useState16[0],
22912
+ setinstcollections = _useState16[1];
22913
+ var _useState17 = useState([]),
22914
+ _useState18 = _slicedToArray(_useState17, 2),
22915
+ instcategories = _useState18[0],
22916
+ setinstcategories = _useState18[1];
22917
+ // const [sortby, setSortby] = useState('Sort by');
22918
+ var _useState19 = useState({
22919
+ min: 0,
22920
+ max: 5
22921
+ }),
22922
+ _useState20 = _slicedToArray(_useState19, 2),
22923
+ raterangevalue = _useState20[0];
22924
+ _useState20[1];
22925
+ // const timeoutRef = React.useRef(null);
22926
+ var _useState21 = useState(''),
22927
+ _useState22 = _slicedToArray(_useState21, 2);
22928
+ _useState22[0];
22929
+ _useState22[1];
22930
+ var _useState23 = useState(''),
22931
+ _useState24 = _slicedToArray(_useState23, 2);
22932
+ _useState24[0];
22933
+ _useState24[1];
22934
+ var _useState25 = useState(''),
22935
+ _useState26 = _slicedToArray(_useState25, 2);
22936
+ _useState26[0];
22937
+ _useState26[1];
22938
+ props.actions.setfetchingtype;
22939
+ var _useState27 = useState([{
22940
+ payloadvalue: 'sortprice',
22941
+ name: lang.price,
22942
+ filterarray: [{
22943
+ name: lang.pricelowtohigh,
22944
+ value: 'lowtohigh',
22945
+ isfilterselected: false
22946
+ }, {
22947
+ name: lang.pricehightolow,
22948
+ value: 'hightolow',
22949
+ isfilterselected: false
22950
+ }]
22951
+ }, {
22952
+ payloadvalue: 'sortdates',
22953
+ name: lang.dates,
22954
+ filterarray: [{
22955
+ name: lang.recent,
22956
+ value: 'recent',
22957
+ isfilterselected: false
22958
+ }, {
22959
+ name: lang.oldest,
22960
+ value: 'old',
22961
+ isfilterselected: false
22962
+ }]
22963
+ }]),
22964
+ _useState28 = _slicedToArray(_useState27, 2);
22965
+ _useState28[0];
22966
+ _useState28[1];
22967
+ props.actions.fetchAuthorizationQueryContext;
22968
+ var _useState29 = useState(false),
22969
+ _useState30 = _slicedToArray(_useState29, 2);
22970
+ _useState30[0];
22971
+ _useState30[1];
22972
+ var _useState31 = useState({
22973
+ min: 0,
22974
+ max: 5
22975
+ }),
22976
+ _useState32 = _slicedToArray(_useState31, 2),
22977
+ price_rangevalue = _useState32[0];
22978
+ _useState32[1];
22979
+ var timeoutRef = React.useRef(null);
22980
+ var timeoutRef_price = React.useRef(null);
22981
+ var timeoutRef__range_price = React.useRef(null);
22982
+ var FetchVendors_byproductsQuery = props.actions.FetchVendors_byproductsQuery;
22877
22983
  useEffect(function () {
22878
- // filterupdater();
22984
+ filterupdater();
22879
22985
  }, []);
22986
+ // useEffect(() => {
22987
+ // if (FetchAllVendorsQuery?.isSuccess && FetchAllVendorsQuery?.data?.data?.vendors != undefined && FetchAllVendorsQuery?.data?.data?.vendors?.length != 0) {
22988
+ // var temp = [...vendorarr];
22989
+ // temp = [...FetchAllVendorsQuery?.data?.data?.vendors];
22990
+ // temp?.forEach(function (instfilteritem, instfilterindex) {
22991
+ // instfilteritem.isfilterselected = false;
22992
+ // });
22993
+ // setvendorsarr([...temp]);
22994
+ // }
22995
+ // }, [FetchAllVendorsQuery?.isSuccess]);
22996
+ useEffect(function () {
22997
+ if (fetchproductoptionsQueryContext.isSuccess) {
22998
+ var _fetchproductoptionsQ;
22999
+ setinstfilters(_toConsumableArray(fetchproductoptionsQueryContext === null || fetchproductoptionsQueryContext === void 0 || (_fetchproductoptionsQ = fetchproductoptionsQueryContext.data) === null || _fetchproductoptionsQ === void 0 || (_fetchproductoptionsQ = _fetchproductoptionsQ.data) === null || _fetchproductoptionsQ === void 0 ? void 0 : _fetchproductoptionsQ.productoptions));
23000
+ }
23001
+ }, [fetchproductoptionsQueryContext.isSuccess]);
22880
23002
  useEffect(function () {
22881
23003
  if (fetchCategoriesQueryContext.isSuccess) {
22882
23004
  var _fetchCategoriesQuery;
22883
23005
  setinstcategories(_toConsumableArray(fetchCategoriesQueryContext === null || fetchCategoriesQueryContext === void 0 || (_fetchCategoriesQuery = fetchCategoriesQueryContext.data) === null || _fetchCategoriesQuery === void 0 || (_fetchCategoriesQuery = _fetchCategoriesQuery.data) === null || _fetchCategoriesQuery === void 0 ? void 0 : _fetchCategoriesQuery.categories));
22884
23006
  }
22885
23007
  }, [fetchCategoriesQueryContext.isSuccess]);
23008
+ useEffect(function () {
23009
+ if (fetchcollectionsQueryContext.isSuccess) {
23010
+ var _fetchcollectionsQuer;
23011
+ var tempcoll = fetchcollectionsQueryContext === null || fetchcollectionsQueryContext === void 0 || (_fetchcollectionsQuer = fetchcollectionsQueryContext.data) === null || _fetchcollectionsQuer === void 0 || (_fetchcollectionsQuer = _fetchcollectionsQuer.data) === null || _fetchcollectionsQuer === void 0 ? void 0 : _fetchcollectionsQuer.collections;
23012
+ var tempcollinfilter = [];
23013
+ {
23014
+ tempcoll === null || tempcoll === void 0 || tempcoll.map(function (collectionitem, collectionindex) {
23015
+ if (collectionitem.isshowntocustomers == 1 && collectionitem.isinftiler == 1) {
23016
+ tempcollinfilter.push(collectionitem);
23017
+ }
23018
+ });
23019
+ }
23020
+ setinstcollections([].concat(tempcollinfilter));
23021
+ // setinstcollections([...fetchcollectionsQueryContext?.data?.data?.collections]);
23022
+ }
23023
+ }, [fetchcollectionsQueryContext.isSuccess]);
23024
+ // useEffect(() => {
23025
+ // // setinstfilters([...authdetailsContext.instinfo.instfilters]);
23026
+ // // setinstcollections([...authdetailsContext.instinfo.instcollections]);
23027
+ // // setinstcategories([...authdetailsContext?.instinfo?.instcategories]);
23028
+ // }, [authdetailsContext]);
22886
23029
  useEffect(function () {
22887
23030
  if (props.sectionpropertiesprops != undefined && props.sectionpropertiesprops.length != 0) {
22888
23031
  setsectionproperties(props.sectionpropertiesprops);
22889
23032
  }
22890
23033
  }, [props.sectionpropertiesprops]);
22891
23034
  useEffect(function () {
22892
- // filterupdater();
23035
+ filterupdater();
22893
23036
  }, [ProductFilterObjContext]);
23037
+ useEffect(function () {
23038
+ if (timeoutRef.current !== null) {
23039
+ clearTimeout(timeoutRef.current);
23040
+ }
23041
+ timeoutRef.current = setTimeout(function () {
23042
+ if (raterangevalue.min != 0 || raterangevalue.max != 5) {
23043
+ var tempfetchproductsfilerobjcontext = _objectSpread$2l({}, ProductFilterObjContext);
23044
+ tempfetchproductsfilerobjcontext.minrate = raterangevalue.min;
23045
+ tempfetchproductsfilerobjcontext.maxrate = raterangevalue.max;
23046
+ tempfetchproductsfilerobjcontext.page = 0;
23047
+ setProductFilterObjContext(_objectSpread$2l({}, tempfetchproductsfilerobjcontext));
23048
+ // routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, encodeURIComponent(JSON.stringify(tempfetchproductsfilerobjcontext)));
23049
+ }
23050
+ }, 500);
23051
+ }, [raterangevalue]);
23052
+ useEffect(function () {
23053
+ if (fetchCategoriesQueryContext.isSuccess && fetchcollectionsQueryContext.isSuccess && instcategories.length != 0) {
23054
+ var parentcollections_for_collectionsFilter = null;
23055
+ var IsValid_parentcollections_for_collectionsFilter = false;
23056
+ if (ProductFilterObjContext.parentcollections_for_collectionsFilter != undefined && ProductFilterObjContext.parentcollections_for_collectionsFilter != null && Array.isArray(ProductFilterObjContext.parentcollections_for_collectionsFilter)) {
23057
+ parentcollections_for_collectionsFilter = ProductFilterObjContext.parentcollections_for_collectionsFilter;
23058
+ }
23059
+ if (parentcollections_for_collectionsFilter != null && Array.isArray(parentcollections_for_collectionsFilter) && parentcollections_for_collectionsFilter.length != 0) {
23060
+ // parentcollections_for_collectionsFilter?.forEach(function(item,index){
23061
+ // if(item.)
23062
+ // })
23063
+ IsValid_parentcollections_for_collectionsFilter = true;
23064
+ }
23065
+ if ((sectionproperties === null || sectionproperties === void 0 ? void 0 : sectionproperties.filterretreivetype) != 'Depend on chosen parent group') {
23066
+ 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)) {
23067
+ var _parentidsfound;
23068
+ var collectiontobevisible = [];
23069
+ var parentidsfound = [];
23070
+ if (ProductFilterObjContext.ProductFetchingType == 'Parent Collection' || IsValid_parentcollections_for_collectionsFilter == true) {
23071
+ if (parentcollections_for_collectionsFilter != null) {
23072
+ parentidsfound = parentcollections_for_collectionsFilter;
23073
+ } else {
23074
+ parentidsfound = ProductFilterObjContext === null || ProductFilterObjContext === void 0 ? void 0 : ProductFilterObjContext.collections;
23075
+ }
23076
+ } else if (ProductFilterObjContext.ProductFetchingType == 'Category') {
23077
+ var _authdetailsContext$i, _authdetailsContext$i2;
23078
+ instcategories === null || instcategories === void 0 || instcategories.forEach(function (catitem, catindex) {
23079
+ var _ProductFilterObjCont;
23080
+ ProductFilterObjContext === null || ProductFilterObjContext === void 0 || (_ProductFilterObjCont = ProductFilterObjContext.collections) === null || _ProductFilterObjCont === void 0 || _ProductFilterObjCont.forEach(function (colitem2, colindex2) {
23081
+ if (catitem.categoryid == colitem2) {
23082
+ var _catitem$parentcollet;
23083
+ catitem === null || catitem === void 0 || (_catitem$parentcollet = catitem.parentcolletions) === null || _catitem$parentcollet === void 0 || _catitem$parentcollet.forEach(function (parentcolitem, parentcolindex) {
23084
+ parentidsfound.push(parentcolitem.parentcollectionid);
23085
+ });
23086
+ }
23087
+ });
23088
+ });
23089
+ if ((authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i = authdetailsContext.instinfo) === null || _authdetailsContext$i === void 0 ? void 0 : _authdetailsContext$i.instid) == '65f69ce0a34b6' || (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i2 = authdetailsContext.instinfo) === null || _authdetailsContext$i2 === void 0 ? void 0 : _authdetailsContext$i2.instid) == '661bd8f2c412d') {
23090
+ _toConsumableArray(instcategories);
23091
+ var newisntcatarr = [];
23092
+ instcategories === null || instcategories === void 0 || instcategories.forEach(function (it2, ind2) {
23093
+ var _ProductFilterObjCont2;
23094
+ ProductFilterObjContext === null || ProductFilterObjContext === void 0 || (_ProductFilterObjCont2 = ProductFilterObjContext.collections) === null || _ProductFilterObjCont2 === void 0 || _ProductFilterObjCont2.forEach(function (colitem2, colindex2) {
23095
+ if (it2.categoryid == colitem2) {
23096
+ newisntcatarr.push(it2);
23097
+ }
23098
+ });
23099
+ });
23100
+ setinstcategories([].concat(newisntcatarr));
23101
+ }
23102
+ } else {
23103
+ instcategories === null || instcategories === void 0 || instcategories.forEach(function (catitem, catindex) {
23104
+ var _catitem$parentcollet2;
23105
+ catitem === null || catitem === void 0 || (_catitem$parentcollet2 = catitem.parentcolletions) === null || _catitem$parentcollet2 === void 0 || _catitem$parentcollet2.forEach(function (parentcolitem, parentcolindex) {
23106
+ var _parentcolitem$collec;
23107
+ parentcolitem === null || parentcolitem === void 0 || (_parentcolitem$collec = parentcolitem.collections) === null || _parentcolitem$collec === void 0 || _parentcolitem$collec.forEach(function (colitem, colindex) {
23108
+ var _ProductFilterObjCont3;
23109
+ ProductFilterObjContext === null || ProductFilterObjContext === void 0 || (_ProductFilterObjCont3 = ProductFilterObjContext.collections) === null || _ProductFilterObjCont3 === void 0 || _ProductFilterObjCont3.forEach(function (colitem2, colindex2) {
23110
+ if (colitem.collectionid == colitem2) {
23111
+ parentidsfound.push(parentcolitem.parentcollectionid);
23112
+ }
23113
+ });
23114
+ });
23115
+ });
23116
+ });
23117
+ }
23118
+ parentidsfound = parentidsfound.filter(function (val, id, array) {
23119
+ return array.indexOf(val) == id;
23120
+ });
23121
+ if (((_parentidsfound = parentidsfound) === null || _parentidsfound === void 0 ? void 0 : _parentidsfound.length) != 0) {
23122
+ instcategories === null || instcategories === void 0 || instcategories.forEach(function (catitem, catindex) {
23123
+ var _catitem$parentcollet3;
23124
+ catitem === null || catitem === void 0 || (_catitem$parentcollet3 = catitem.parentcolletions) === null || _catitem$parentcollet3 === void 0 || _catitem$parentcollet3.forEach(function (parentcolitem, parentcolindex) {
23125
+ var _parentidsfound2;
23126
+ (_parentidsfound2 = parentidsfound) === null || _parentidsfound2 === void 0 || _parentidsfound2.forEach(function (parentidfounditem, parentidfoundindex) {
23127
+ if (parentidfounditem == (parentcolitem === null || parentcolitem === void 0 ? void 0 : parentcolitem.parentcollectionid)) {
23128
+ var _parentcolitem$collec2;
23129
+ parentcolitem === null || parentcolitem === void 0 || (_parentcolitem$collec2 = parentcolitem.collections) === null || _parentcolitem$collec2 === void 0 || _parentcolitem$collec2.forEach(function (colitem, colindex) {
23130
+ var iscolexists = false;
23131
+ collectiontobevisible === null || collectiontobevisible === void 0 || collectiontobevisible.forEach(function (colitemex, colindexex) {
23132
+ if (colitemex.collectionid == colitem.collectionid) {
23133
+ iscolexists = true;
23134
+ }
23135
+ });
23136
+ if (iscolexists == false) {
23137
+ collectiontobevisible.push(colitem);
23138
+ }
23139
+ });
23140
+ }
23141
+ });
23142
+ });
23143
+ });
23144
+ if ((collectiontobevisible === null || collectiontobevisible === void 0 ? void 0 : collectiontobevisible.length) != 0) {
23145
+ setcollectionstobevisible(collectiontobevisible);
23146
+ } else {
23147
+ setcollectionstobevisible(instcollections);
23148
+ }
23149
+ } else {
23150
+ setcollectionstobevisible(instcollections);
23151
+ }
23152
+ } else {
23153
+ setcollectionstobevisible(instcollections);
23154
+ }
23155
+ } else {
23156
+ setcollectionstobevisible(instcollections);
23157
+ }
22894
23158
 
23159
+ //
23160
+ //
23161
+ //
23162
+ var collectiontobevisible2 = [];
23163
+ instcategories === null || instcategories === void 0 || instcategories.forEach(function (catitem, catindex) {
23164
+ var _catitem$parentcollet4;
23165
+ catitem === null || catitem === void 0 || (_catitem$parentcollet4 = catitem.parentcolletions) === null || _catitem$parentcollet4 === void 0 || _catitem$parentcollet4.forEach(function (parentcolitem, parentcolindex) {
23166
+ if (parentcolitem.parentcollectionid == '679eef4735b11') {
23167
+ var _parentcolitem$collec3;
23168
+ parentcolitem === null || parentcolitem === void 0 || (_parentcolitem$collec3 = parentcolitem.collections) === null || _parentcolitem$collec3 === void 0 || _parentcolitem$collec3.forEach(function (colitem, colindex) {
23169
+ var iscolexists = false;
23170
+ portfoliocollectionstobevisible === null || portfoliocollectionstobevisible === void 0 || portfoliocollectionstobevisible.forEach(function (colitemex, colindexex) {
23171
+ if (colitemex.collectionid == colitem.collectionid) {
23172
+ iscolexists = true;
23173
+ }
23174
+ });
23175
+ if (iscolexists == false) {
23176
+ portfoliocollectionstobevisible.push(colitem);
23177
+ }
23178
+ });
23179
+ }
23180
+ });
23181
+ });
23182
+ if ((collectiontobevisible2 === null || collectiontobevisible2 === void 0 ? void 0 : collectiontobevisible2.length) != 0) {
23183
+ setportfoliocollectionstobevisible(collectiontobevisible2);
23184
+ }
23185
+ }
23186
+ }, [ProductFilterObjContext, fetchCategoriesQueryContext.isSuccess, fetchcollectionsQueryContext.isSuccess, instcollections]);
22895
23187
  // useEffect(() => {
22896
- // if (sectionproperties?.filterretreivetype == 'Depend on chosen parent group') {
22897
- // if (ProductFilterObjContext?.collections != undefined && ProductFilterObjContext?.collections != null && Array.isArray(ProductFilterObjContext?.collections)) {
22898
- // var collectiontobevisible = [];
22899
- // var parentidsfound = [];
22900
- // if (ProductFilterObjContext.ProductFetchingType == 'Parent Collection') {
22901
- // parentidsfound = ProductFilterObjContext?.collections;
22902
- // } else if (ProductFilterObjContext.ProductFetchingType == 'Category') {
22903
- // instcategories?.forEach(function (catitem, catindex) {
22904
- // ProductFilterObjContext?.collections?.forEach(function (colitem2, colindex2) {
22905
- // if (catitem.categoryid == colitem2) {
22906
- // catitem?.parentcolletions?.forEach(function (parentcolitem, parentcolindex) {
22907
- // parentidsfound.push(parentcolitem.parentcollectionid);
22908
- // });
22909
- // }
22910
- // });
22911
- // });
22912
- // } else {
22913
- // instcategories?.forEach(function (catitem, catindex) {
22914
- // catitem?.parentcolletions?.forEach(function (parentcolitem, parentcolindex) {
22915
- // parentcolitem?.collections?.forEach(function (colitem, colindex) {
22916
- // ProductFilterObjContext?.collections?.forEach(function (colitem2, colindex2) {
22917
- // if (colitem.collectionid == colitem2) {
22918
- // parentidsfound.push(parentcolitem.parentcollectionid);
22919
- // }
22920
- // });
22921
- // });
22922
- // });
22923
- // });
22924
- // }
22925
-
22926
- // parentidsfound = parentidsfound.filter((val, id, array) => array.indexOf(val) == id);
22927
-
22928
- // if (parentidsfound?.length != 0) {
22929
- // instcategories?.forEach(function (catitem, catindex) {
22930
- // catitem?.parentcolletions?.forEach(function (parentcolitem, parentcolindex) {
22931
- // parentidsfound?.forEach(function (parentidfounditem, parentidfoundindex) {
22932
- // if (parentidfounditem == parentcolitem?.parentcollectionid) {
22933
- // parentcolitem?.collections?.forEach(function (colitem, colindex) {
22934
- // var iscolexists = false;
22935
- // collectiontobevisible?.forEach(function (colitemex, colindexex) {
22936
- // if (colitemex.collectionid == colitem.collectionid) {
22937
- // iscolexists = true;
22938
- // }
22939
- // });
22940
- // if (iscolexists == false) {
22941
- // collectiontobevisible.push(colitem);
22942
- // }
22943
- // });
22944
- // }
22945
- // });
22946
- // });
22947
- // });
22948
-
22949
- // if (collectiontobevisible?.length != 0) {
22950
- // setcollectionstobevisible(collectiontobevisible);
22951
- // } else {
22952
- // setcollectionstobevisible(instcollections);
22953
- // }
22954
- // } else {
22955
- // setcollectionstobevisible(instcollections);
22956
- // }
22957
- // } else {
22958
- // setcollectionstobevisible(instcollections);
22959
- // }
22960
- // } else {
22961
- // setcollectionstobevisible(instcollections);
22962
- // }
22963
- // }, [ProductFilterObjContext]);
22964
-
22965
- // const filterupdater = () => {
22966
- // if (instcategories.length != 0) {
22967
- // var tempInstcategories = [...instcategories];
22968
- // tempInstcategories.forEach(function (catitem, catindex) {
22969
- // catitem.parentcolletions.forEach(function (parentcolitem, parentcolindex) {
22970
- // parentcolitem.collections.forEach(function (colitem, colindex) {
22971
- // colitem.isfilterselected = false;
22972
- // });
22973
- // });
22974
- // });
22975
-
22976
- // ProductFilterObjContext?.collections?.forEach(function (filteritem, filterindex) {
22977
- // tempInstcategories.forEach(function (catitem, catindex) {
22978
- // catitem.parentcolletions.forEach(function (parentcolitem, parentcolindex) {
22979
- // parentcolitem.collections.forEach(function (colitem, colindex) {
22980
- // if (colitem.collectionid == filteritem) {
22981
- // colitem.isfilterselected = true;
22982
- // }
22983
- // });
22984
- // });
22985
- // });
22986
- // });
22987
-
22988
- // setinstcategories([...tempInstcategories]);
22989
- // }
22990
- // // if (instcollections.length != 0) {
22991
- // // var tempInstcollections = [...instcollections];
22992
- // // tempInstcollections.forEach(function (instfilteritem, valefilteritemindex) {
22993
- // // instfilteritem.isfilterselected = false;
22994
- // // });
22995
- // // ProductFilterObjContext?.collections?.forEach(function (filteritem, filterindex) {
22996
- // // tempInstcollections?.forEach(function (instfilteritem, instfilterindex) {
22997
- // // if (instfilteritem.collectionid == filteritem) {
22998
- // // instfilteritem.isfilterselected = true;
22999
- // // }
23000
- // // });
23001
- // // });
23002
- // // setinstcollections([...tempInstcollections]);
23188
+ // // if (productfeatuesarr.length != 0) {
23189
+ // var tempfetchproductsfilerobjcontext = { ...ProductFilterObjContext };
23190
+ // tempfetchproductsfilerobjcontext.prod_featruesar = productfeatuesarr;
23191
+ // setProductFilterObjContext({ ...tempfetchproductsfilerobjcontext });
23192
+ // filterrouting(tempfetchproductsfilerobjcontext);
23003
23193
  // // }
23004
- // };
23194
+ // }, [productfeatuesarr]);
23195
+ useEffect(function () {
23196
+ if (productfeatuesarr.length != 0) {
23197
+ var tempfetchproductsfilerobjcontext = _objectSpread$2l({}, ProductFilterObjContext);
23198
+ tempfetchproductsfilerobjcontext.prod_featruesar = productfeatuesarr;
23199
+ setProductFilterObjContext(_objectSpread$2l({}, tempfetchproductsfilerobjcontext));
23200
+ filterrouting(tempfetchproductsfilerobjcontext);
23201
+ } else if (productfeatuesarr.length == 0) {
23202
+ var tempfetchproductsfilerobjcontext = _objectSpread$2l({}, ProductFilterObjContext);
23203
+ tempfetchproductsfilerobjcontext.prod_featruesar = productfeatuesarr;
23204
+ setProductFilterObjContext(_objectSpread$2l({}, tempfetchproductsfilerobjcontext));
23205
+ // filterrouting(tempfetchproductsfilerobjcontext);
23206
+ }
23207
+ }, [productfeatuesarr]);
23208
+ useEffect(function () {
23209
+ if (fetchTabexStatesQueryContext.isSuccess) {
23210
+ if (ProductFilterObjContext.stateid != undefined && ProductFilterObjContext.stateid != null && ProductFilterObjContext.stateid != '' && ProductFilterObjContext.stateid != 'all') {
23211
+ var tempFetchTabexStatesPayloadobjContext = _objectSpread$2l({}, FetchTabexStatesPayloadobjContext);
23212
+ tempFetchTabexStatesPayloadobjContext.functype = 'cities';
23213
+ tempFetchTabexStatesPayloadobjContext.state_id = ProductFilterObjContext.stateid;
23214
+ setFetchTabexStatesPayloadobjContext(_objectSpread$2l({}, tempFetchTabexStatesPayloadobjContext));
23215
+ }
23216
+ }
23217
+ }, [fetchTabexStatesQueryContext.isSuccess]);
23218
+ var filterupdater = function filterupdater() {
23219
+ setTimeout(function () {
23220
+ var tempFetchQueriesEngineContext = _objectSpread$2l({}, FetchQueriesEngineContext);
23221
+ tempFetchQueriesEngineContext.fetchtabexcountries = true;
23222
+ setFetchQueriesEngineContext(tempFetchQueriesEngineContext);
23223
+ }, 100);
23224
+ if (ProductFilterObjContext.countryid != undefined && ProductFilterObjContext.countryid != null && ProductFilterObjContext.countryid != '' && ProductFilterObjContext.countryid != 'all') {
23225
+ var tempFetchTabexStatesPayloadobjContext = _objectSpread$2l({}, FetchTabexStatesPayloadobjContext);
23226
+ tempFetchTabexStatesPayloadobjContext.functype = 'states';
23227
+ tempFetchTabexStatesPayloadobjContext.country_id = ProductFilterObjContext.countryid;
23228
+ setFetchTabexStatesPayloadobjContext(_objectSpread$2l({}, tempFetchTabexStatesPayloadobjContext));
23229
+ }
23230
+ if (instfilters.length != 0) {
23231
+ var _ProductFilterObjCont4;
23232
+ var tempinstfilters = _toConsumableArray(instfilters);
23233
+ tempinstfilters === null || tempinstfilters === void 0 || tempinstfilters.forEach(function (instfilteritem, instfilterindex) {
23234
+ instfilteritem.productvaluesfilter.forEach(function (valefilteritem, valefilteritemindex) {
23235
+ valefilteritem.isfilterselected = false;
23236
+ });
23237
+ });
23238
+ ProductFilterObjContext === null || ProductFilterObjContext === void 0 || (_ProductFilterObjCont4 = ProductFilterObjContext.FilterOptions) === null || _ProductFilterObjCont4 === void 0 || _ProductFilterObjCont4.forEach(function (filteritem, filterindex) {
23239
+ tempinstfilters === null || tempinstfilters === void 0 || tempinstfilters.forEach(function (instfilteritem, instfilterindex) {
23240
+ var _instfilteritem$produ;
23241
+ instfilteritem === null || instfilteritem === void 0 || (_instfilteritem$produ = instfilteritem.productvaluesfilter) === null || _instfilteritem$produ === void 0 || _instfilteritem$produ.forEach(function (valefilteritem, valefilteritemindex) {
23242
+ if (filteritem.valueid == valefilteritem.valueid) {
23243
+ valefilteritem.isfilterselected = true;
23244
+ }
23245
+ });
23246
+ });
23247
+ });
23248
+ setinstfilters(_toConsumableArray(tempinstfilters));
23249
+ }
23250
+ if (instcategories.length != 0) {
23251
+ var _ProductFilterObjCont5;
23252
+ var tempInstcategories = _toConsumableArray(instcategories);
23253
+ tempInstcategories.forEach(function (catitem, catindex) {
23254
+ catitem.parentcolletions.forEach(function (parentcolitem, parentcolindex) {
23255
+ parentcolitem.collections.forEach(function (colitem, colindex) {
23256
+ colitem.isfilterselected = false;
23257
+ });
23258
+ });
23259
+ });
23260
+ ProductFilterObjContext === null || ProductFilterObjContext === void 0 || (_ProductFilterObjCont5 = ProductFilterObjContext.collections) === null || _ProductFilterObjCont5 === void 0 || _ProductFilterObjCont5.forEach(function (filteritem, filterindex) {
23261
+ tempInstcategories.forEach(function (catitem, catindex) {
23262
+ catitem.parentcolletions.forEach(function (parentcolitem, parentcolindex) {
23263
+ parentcolitem.collections.forEach(function (colitem, colindex) {
23264
+ if (colitem.collectionid == filteritem) {
23265
+ colitem.isfilterselected = true;
23266
+ }
23267
+ });
23268
+ });
23269
+ });
23270
+ });
23271
+ setinstcategories(_toConsumableArray(tempInstcategories));
23272
+ }
23273
+ if (instcollections.length != 0) {
23274
+ var _ProductFilterObjCont6;
23275
+ var tempInstcollections = _toConsumableArray(instcollections);
23276
+ tempInstcollections.forEach(function (instfilteritem, valefilteritemindex) {
23277
+ instfilteritem.isfilterselected = false;
23278
+ });
23279
+ ProductFilterObjContext === null || ProductFilterObjContext === void 0 || (_ProductFilterObjCont6 = ProductFilterObjContext.collections) === null || _ProductFilterObjCont6 === void 0 || _ProductFilterObjCont6.forEach(function (filteritem, filterindex) {
23280
+ tempInstcollections === null || tempInstcollections === void 0 || tempInstcollections.forEach(function (instfilteritem, instfilterindex) {
23281
+ if (instfilteritem.collectionid == filteritem) {
23282
+ instfilteritem.isfilterselected = true;
23283
+ }
23284
+ });
23285
+ });
23286
+ setinstcollections(_toConsumableArray(tempInstcollections));
23287
+ }
23288
+ };
23005
23289
  var setCollectionFilterFunc = function setCollectionFilterFunc(collectionid) {
23006
- var _tempfetchproductsfil;
23290
+ var _tempfetchproductsfil2, _tempfetchproductsfil3;
23007
23291
  var tempfetchproductsfilerobjcontext = _objectSpread$2l({}, ProductFilterObjContext);
23008
23292
  var CollectionExists = false;
23009
- tempfetchproductsfilerobjcontext === null || tempfetchproductsfilerobjcontext === void 0 || (_tempfetchproductsfil = tempfetchproductsfilerobjcontext.categories) === null || _tempfetchproductsfil === void 0 || _tempfetchproductsfil.forEach(function (filteritem, filterindex) {
23010
- if (filteritem == collectionid) {
23011
- CollectionExists = true;
23012
- tempfetchproductsfilerobjcontext.categories.splice(filterindex, 1);
23293
+ if (tempfetchproductsfilerobjcontext.ProductFetchingType == 'Parent Collection' && tempfetchproductsfilerobjcontext.parentcollections_for_collectionsFilter == undefined) {
23294
+ tempfetchproductsfilerobjcontext.parentcollections_for_collectionsFilter = tempfetchproductsfilerobjcontext.collections;
23295
+ }
23296
+ tempfetchproductsfilerobjcontext === null || tempfetchproductsfilerobjcontext === void 0 || (_tempfetchproductsfil2 = tempfetchproductsfilerobjcontext.collections) === null || _tempfetchproductsfil2 === void 0 || _tempfetchproductsfil2.forEach(function (filteritem, filterindex) {
23297
+ if (sectionproperties.filterdirection != 'Horizontal') {
23298
+ if (filteritem == collectionid) {
23299
+ CollectionExists = true;
23300
+ tempfetchproductsfilerobjcontext.collections.splice(filterindex, 1);
23301
+ }
23013
23302
  }
23014
23303
  });
23015
23304
  if (!CollectionExists) {
23016
- if (tempfetchproductsfilerobjcontext.categories != undefined && Array.isArray(tempfetchproductsfilerobjcontext.categories)) {
23017
- tempfetchproductsfilerobjcontext.categories = [collectionid];
23305
+ if (tempfetchproductsfilerobjcontext.collections != undefined && Array.isArray(tempfetchproductsfilerobjcontext.collections)) {
23306
+ if (sectionproperties.filterdirection == 'Horizontal') {
23307
+ // if (sectionproperties.filterType != 'Title & Sort By Only' && sectionproperties.filterdirection == 'Horizontal') {
23308
+ // tempfetchproductsfilerobjcontext.collections = [];
23309
+ // tempfetchproductsfilerobjcontext.collections.push(collectionid);
23310
+ tempfetchproductsfilerobjcontext.collections = [collectionid];
23311
+ } else {
23312
+ tempfetchproductsfilerobjcontext.collections.push(collectionid);
23313
+ }
23018
23314
  } else {
23019
- tempfetchproductsfilerobjcontext.categories = [collectionid];
23315
+ tempfetchproductsfilerobjcontext.collections = [collectionid];
23316
+ }
23317
+ }
23318
+ tempfetchproductsfilerobjcontext.ProductFetchingType = 'Random';
23319
+ if (tempfetchproductsfilerobjcontext.parentcollections_for_collectionsFilter != undefined && tempfetchproductsfilerobjcontext.parentcollections_for_collectionsFilter != null && (tempfetchproductsfilerobjcontext === null || tempfetchproductsfilerobjcontext === void 0 || (_tempfetchproductsfil3 = tempfetchproductsfilerobjcontext.parentcollections_for_collectionsFilter) === null || _tempfetchproductsfil3 === void 0 ? void 0 : _tempfetchproductsfil3.length) != 0) {
23320
+ var _tempfetchproductsfil4;
23321
+ if (tempfetchproductsfilerobjcontext.collections != undefined && tempfetchproductsfilerobjcontext.collections != null && (tempfetchproductsfilerobjcontext === null || tempfetchproductsfilerobjcontext === void 0 || (_tempfetchproductsfil4 = tempfetchproductsfilerobjcontext.collections) === null || _tempfetchproductsfil4 === void 0 ? void 0 : _tempfetchproductsfil4.length) == 1) {
23322
+ tempfetchproductsfilerobjcontext.ProductFetchingType = 'Parent Collection';
23020
23323
  }
23021
23324
  }
23022
23325
  tempfetchproductsfilerobjcontext.page = 0;
23023
- tempfetchproductsfilerobjcontext.ProductFetchingType = 'Random';
23024
23326
  setProductFilterObjContext(_objectSpread$2l({}, tempfetchproductsfilerobjcontext));
23025
23327
  filterrouting(tempfetchproductsfilerobjcontext);
23026
23328
  // routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, encodeURIComponent(JSON.stringify(tempfetchproductsfilerobjcontext)));
23027
23329
  };
23028
- var CollectionsFilter = function CollectionsFilter() {
23029
- return /*#__PURE__*/React.createElement("div", {
23030
- "class": "col-lg-12 p-0 scrollhorixontalcontainer text-center px-sm-3"
23031
- }, instcategories.map(function (item, index) {
23032
- return /*#__PURE__*/React.createElement("p", {
23033
- "class": filter_cssstyles.filteritem + ' m-0 p-0 cursor-pointer scrollhorixontaldiv mx-4 mx-sm-2 ',
23034
- onClick: function onClick() {
23035
- setCollectionFilterFunc(item.categoryid);
23036
- },
23037
- style: {
23038
- color: item.isfilterselected ? sectionproperties.activecat_color : ''
23039
- }
23040
- }, langdetect == 'en' ? item.title_en : item.title_ar);
23041
- }));
23042
- };
23330
+ useEffect(function () {
23331
+ var _FetchAllVendorsQuery, _FetchAllVendorsQuery2, _FetchVendors_byprodu, _FetchVendors_byprodu2;
23332
+ if (FetchAllVendorsQuery !== null && FetchAllVendorsQuery !== void 0 && FetchAllVendorsQuery.isSuccess && (FetchAllVendorsQuery === null || FetchAllVendorsQuery === void 0 || (_FetchAllVendorsQuery = FetchAllVendorsQuery.data) === null || _FetchAllVendorsQuery === void 0 || (_FetchAllVendorsQuery = _FetchAllVendorsQuery.data) === null || _FetchAllVendorsQuery === void 0 ? void 0 : _FetchAllVendorsQuery.vendors) != undefined && (FetchAllVendorsQuery === null || FetchAllVendorsQuery === void 0 || (_FetchAllVendorsQuery2 = FetchAllVendorsQuery.data) === null || _FetchAllVendorsQuery2 === void 0 || (_FetchAllVendorsQuery2 = _FetchAllVendorsQuery2.data) === null || _FetchAllVendorsQuery2 === void 0 || (_FetchAllVendorsQuery2 = _FetchAllVendorsQuery2.vendors) === null || _FetchAllVendorsQuery2 === void 0 ? void 0 : _FetchAllVendorsQuery2.length) != 0 && FetchVendors_byproductsQuery !== null && FetchVendors_byproductsQuery !== void 0 && FetchVendors_byproductsQuery.isSuccess && (FetchVendors_byproductsQuery === null || FetchVendors_byproductsQuery === void 0 || (_FetchVendors_byprodu = FetchVendors_byproductsQuery.data) === null || _FetchVendors_byprodu === void 0 || (_FetchVendors_byprodu = _FetchVendors_byprodu.data) === null || _FetchVendors_byprodu === void 0 ? void 0 : _FetchVendors_byprodu.vendors) != undefined && (FetchVendors_byproductsQuery === null || FetchVendors_byproductsQuery === void 0 || (_FetchVendors_byprodu2 = FetchVendors_byproductsQuery.data) === null || _FetchVendors_byprodu2 === void 0 || (_FetchVendors_byprodu2 = _FetchVendors_byprodu2.data) === null || _FetchVendors_byprodu2 === void 0 || (_FetchVendors_byprodu2 = _FetchVendors_byprodu2.vendors) === null || _FetchVendors_byprodu2 === void 0 ? void 0 : _FetchVendors_byprodu2.length) != 0) {
23333
+ var _authdetailsContext$i3, _temp;
23334
+ var temp = _toConsumableArray(vendorarr);
23335
+ if ((authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i3 = authdetailsContext.instinfo) === null || _authdetailsContext$i3 === void 0 ? void 0 : _authdetailsContext$i3.instid) == '68f776707423b') {
23336
+ var _FetchVendors_byprodu3;
23337
+ temp = _toConsumableArray(FetchVendors_byproductsQuery === null || FetchVendors_byproductsQuery === void 0 || (_FetchVendors_byprodu3 = FetchVendors_byproductsQuery.data) === null || _FetchVendors_byprodu3 === void 0 || (_FetchVendors_byprodu3 = _FetchVendors_byprodu3.data) === null || _FetchVendors_byprodu3 === void 0 ? void 0 : _FetchVendors_byprodu3.vendors);
23338
+ } else {
23339
+ var _FetchAllVendorsQuery3;
23340
+ temp = _toConsumableArray(FetchAllVendorsQuery === null || FetchAllVendorsQuery === void 0 || (_FetchAllVendorsQuery3 = FetchAllVendorsQuery.data) === null || _FetchAllVendorsQuery3 === void 0 || (_FetchAllVendorsQuery3 = _FetchAllVendorsQuery3.data) === null || _FetchAllVendorsQuery3 === void 0 ? void 0 : _FetchAllVendorsQuery3.vendors);
23341
+ }
23342
+ (_temp = temp) === null || _temp === void 0 || _temp.forEach(function (instfilteritem, instfilterindex) {
23343
+ instfilteritem.isfilterselected = false;
23344
+ });
23345
+ setvendorsarr(_toConsumableArray(temp));
23346
+ }
23347
+ }, [FetchAllVendorsQuery === null || FetchAllVendorsQuery === void 0 ? void 0 : FetchAllVendorsQuery.isSuccess, FetchVendors_byproductsQuery.isSuccess]);
23043
23348
  var filter_cssstyles = {
23044
- filteritem: css({
23349
+ form_control: css((_css = {
23350
+ position: 'relative',
23351
+ display: 'flex',
23352
+ alignItems: 'center'
23353
+ }, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_css, "display", 'block'), "width", '100%'), "padding", '0 30px'), "transition", '.3s'), "fontWeight", 500), "border", '1px solid #ccc'), "borderRadius", '5px'), "height", '40px'), "background", 'transparent'), "color", '#000'), _defineProperty(_defineProperty(_css, "fontSize", '14px'), ':focus', {
23354
+ // borderColor: sectionproperties.inputfeildbordercoloronfocus,
23355
+ borderColor: '#eac435',
23356
+ boxShadow: 'none'
23357
+ }))),
23358
+ collapsetitle: css({
23359
+ fontSize: sectionproperties.filtertitle_fontsize + 'px',
23360
+ fontWeight: sectionproperties.filtertitle_fontweight,
23361
+ textTransform: sectionproperties.filtertitle_texttransform,
23362
+ color: sectionproperties.filtertitle_color,
23363
+ ':hover': {
23364
+ color: sectionproperties.filtertitle_coloronhover
23365
+ }
23366
+ }),
23367
+ titlecontainer: css({
23368
+ color: sectionproperties.filtertitle_color,
23369
+ ':hover .collapsetitle': {
23370
+ color: sectionproperties.filtertitle_coloronhover
23371
+ }
23372
+ }),
23373
+ timeline_text: css({
23045
23374
  fontSize: sectionproperties.timeline_text_fontsize + 'px',
23046
23375
  fontWeight: sectionproperties.timeline_text_fontweight,
23047
23376
  textTransform: sectionproperties.timeline_text_texttransform,
@@ -23050,6 +23379,111 @@ var CollectionsFilterHorizontal = function CollectionsFilterHorizontal(props) {
23050
23379
  ':hover': {
23051
23380
  color: sectionproperties.timeline_text_coloronhover
23052
23381
  }
23382
+ }),
23383
+ btnstyles: css({
23384
+ color: sectionproperties.generalbtn_textColor,
23385
+ fontSize: sectionproperties.generalbtn_fontsize + 'px',
23386
+ textTransform: sectionproperties.generalbtn_texttransform,
23387
+ width: sectionproperties.generalbtn_width + 'px',
23388
+ height: sectionproperties.generalbtn_height + 'px',
23389
+ background: sectionproperties.generalbtn_bgColor,
23390
+ borderTopLeftRadius: sectionproperties.generalbtn_bordertopleftradius + 'px',
23391
+ borderTopRightRadius: sectionproperties.generalbtn_bordertoprightradius + 'px',
23392
+ borderBottomRightRadius: sectionproperties.generalbtn_borderbottomrightradius + 'px',
23393
+ borderBottomLeftRadius: sectionproperties.generalbtn_borderbottomleftradius + 'px',
23394
+ fontWeight: sectionproperties.generalbtn_fontweight,
23395
+ transition: '.3s',
23396
+ ':hover': {
23397
+ background: sectionproperties.generalbtn_bgColoronhover,
23398
+ color: sectionproperties.generalbtn_textColoronhover
23399
+ }
23400
+ }),
23401
+ close_menu_icon_cont: css({
23402
+ background: sectionproperties.closeSliderBgColor,
23403
+ width: sectionproperties.closeSliderWidth + 'px',
23404
+ height: sectionproperties.closeSliderHeight + 'px',
23405
+ borderRadius: sectionproperties.closeSlider_borderBottomLeftRadius + 'px',
23406
+ ':hover': {
23407
+ background: sectionproperties.closeSliderBgColorHover
23408
+ }
23409
+ }),
23410
+ horizontalfilter_card: css({
23411
+ marginBottom: sectionproperties.horizontalfilter_mb + 'px',
23412
+ marginTop: sectionproperties.horizontalfilter_mt + 'px',
23413
+ background: sectionproperties.horizontalfilter_cardbg,
23414
+ border: sectionproperties.horizontalfilter_cardborderwidth + 'px solid ' + sectionproperties.horizontalfilter_cardbordercolor,
23415
+ boxShadow: sectionproperties.horizontalfilter_cardboxShadow == 'Show' ? sectionproperties.horizontalfilter_cardboxShadowcolor : 'horizontalfilter_cardboxShadow'
23416
+ }),
23417
+ btn_item: css({
23418
+ width: '15px',
23419
+ height: '15px',
23420
+ background: sectionproperties.filteritembtn_bgcolor,
23421
+ ':hover': {
23422
+ background: sectionproperties.filteritembtn_bghover
23423
+ }
23424
+ }),
23425
+ btn_item_active: css({
23426
+ background: sectionproperties.activecat_color
23427
+ }),
23428
+ timelineinnercont_active: css({
23429
+ fontWeight: sectionproperties.activecat_fontweight,
23430
+ color: sectionproperties.activecat_color
23431
+ }),
23432
+ categoryName: css({
23433
+ color: sectionproperties.filtertitle_color,
23434
+ fontWeight: sectionproperties.filterCatFontWeight,
23435
+ fontSize: sectionproperties.filterCatFontSize + 'px'
23436
+ }),
23437
+ pCollectionName: css({
23438
+ color: sectionproperties.filtertitle_color,
23439
+ fontWeight: sectionproperties.filterPCollFontWeight,
23440
+ fontSize: sectionproperties.filterPCollFontSize + 'px'
23441
+ }),
23442
+ explorebtn: css({
23443
+ fontSize: sectionproperties.explorebtnfontsize + 'px',
23444
+ fontWeight: 600,
23445
+ color: sectionproperties.explorebtncolor,
23446
+ transition: '.3s',
23447
+ ':hover': {
23448
+ color: sectionproperties.explorebtncoloronhover
23449
+ }
23450
+ }),
23451
+ showallbtn: css({
23452
+ color: sectionproperties.showallcolor,
23453
+ ':hover': {
23454
+ transition: '.3s',
23455
+ cursor: 'pointer',
23456
+ color: sectionproperties.showallcolorhover
23457
+ }
23458
+ }),
23459
+ sectiontitle: css({
23460
+ position: 'relative',
23461
+ justifyContent: sectionproperties.sectiontitleposition == 'Centered' ? 'center' : '',
23462
+ width: sectionproperties.sectiontitlestyle == 'Line Before Text' ? '100%' : '',
23463
+ fontSize: sectionproperties.sectionTitleFontSize + 'px',
23464
+ '@media (max-width: 800px)': {
23465
+ fontSize: sectionproperties.sectionTitleFontSizeresp + 'px'
23466
+ }
23467
+ }),
23468
+ filtercard: css({
23469
+ minWidth: sectionproperties.filterdirection == 'Collections Vertical' ? '100%' : sectionproperties.filtercardwidth + 'px',
23470
+ maxWidth: sectionproperties.filterdirection == 'Collections Vertical' ? '100%' : sectionproperties.filtercardwidth + 'px'
23471
+ }),
23472
+ filtercardfilter: css({
23473
+ minWidth: '100px',
23474
+ maxWidth: '100px'
23475
+ }),
23476
+ filteroptionvertical: css({
23477
+ border: sectionproperties.filter_optionborderwidth + 'px solid ' + sectionproperties.filter_optionbordercolor,
23478
+ color: sectionproperties.timeline_text_color,
23479
+ ':hover': {
23480
+ color: sectionproperties.timeline_text_coloronhover
23481
+ }
23482
+ // filter_activebackgroundtransparent
23483
+ }),
23484
+ filteroptionverticalactive: css({
23485
+ background: sectionproperties.btn_item_activebgcolor,
23486
+ color: sectionproperties.activecat_color
23053
23487
  })
23054
23488
  };
23055
23489
  var filterrouting = function filterrouting(tempfetchproductsfilerobjcontext) {
@@ -23065,14 +23499,99 @@ var CollectionsFilterHorizontal = function CollectionsFilterHorizontal(props) {
23065
23499
  routingcountext(StaticPagesLinksContext[pagenamepathinstaticpagelinkcont], true, encodeURIComponent(JSON.stringify(tempfetchproductsfilerobjcontext)));
23066
23500
  }
23067
23501
  };
23068
- return /*#__PURE__*/React.createElement("div", {
23069
- className: 'col-lg-12 p-0 w-100 allcentered mt-md-2 ',
23070
- style: {
23071
- marginTop: sectionproperties.filtersection_mt + 'px'
23502
+ useEffect(function () {
23503
+ if (timeoutRef_price.current !== null) {
23504
+ clearTimeout(timeoutRef_price.current);
23505
+ }
23506
+ timeoutRef_price.current = setTimeout(function () {
23507
+ if (pricevalue2.min != '' && pricevalue2.max != '') {
23508
+ var tempfetchproductsfilerobjcontext = _objectSpread$2l({}, ProductFilterObjContext);
23509
+ tempfetchproductsfilerobjcontext.price_min = pricevalue2.min;
23510
+ tempfetchproductsfilerobjcontext.price_max = pricevalue2.max;
23511
+ tempfetchproductsfilerobjcontext.page = 0;
23512
+ setProductFilterObjContext(_objectSpread$2l({}, tempfetchproductsfilerobjcontext));
23513
+ // routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, encodeURIComponent(JSON.stringify(tempfetchproductsfilerobjcontext)));
23514
+ }
23515
+ }, 500);
23516
+ }, [pricevalue2]);
23517
+ useEffect(function () {
23518
+ if (timeoutRef__range_price.current !== null) {
23519
+ clearTimeout(timeoutRef__range_price.current);
23072
23520
  }
23521
+ timeoutRef__range_price.current = setTimeout(function () {
23522
+ if (price_rangevalue.min != '' && price_rangevalue.max != '') {
23523
+ var tempfetchproductsfilerobjcontext = _objectSpread$2l({}, ProductFilterObjContext);
23524
+ tempfetchproductsfilerobjcontext.price_min = price_rangevalue.min;
23525
+ tempfetchproductsfilerobjcontext.price_max = price_rangevalue.max;
23526
+ tempfetchproductsfilerobjcontext.page = 0;
23527
+ setProductFilterObjContext(_objectSpread$2l({}, tempfetchproductsfilerobjcontext));
23528
+ // routingcountext(StaticPagesLinksContext.GeneralProductsComponent, true, encodeURIComponent(JSON.stringify(tempfetchproductsfilerobjcontext)));
23529
+ }
23530
+ }, 500);
23531
+ }, [price_rangevalue]);
23532
+ // const queryParameters = new URLSearchParams(window.location.search);
23533
+ // useEffect(() => {
23534
+ // // setsortbycontext('Sort By');
23535
+ // if (queryParameters.get('sortprice') == undefined) {
23536
+ // setsortbycontext('Sort By');
23537
+ // } else {
23538
+ // var temp = { ...sortbycontext };
23539
+ // temp = queryParameters.get('sortprice');
23540
+ // alert(temp);
23541
+ // }
23542
+ // }, []);
23543
+ return /*#__PURE__*/React.createElement("div", {
23544
+ // className={sectionproperties.filterdirection == 'Horizontal' ? 'col-lg-12 p-0 w-100 filter mt-md-0 ' : 'col-lg-12 p-0 w-100 filter mt-md-0 d-md-none'}
23545
+ className: 'row mx-0 p-0 w-100 mt-3'
23546
+ // style={{ marginTop: sectionproperties.filtersection_mt + 'px', minHeight: sectionproperties.filterminheight == 0 ? 'auto' : sectionproperties.filterminheight + 'vh' }}
23073
23547
  }, /*#__PURE__*/React.createElement("div", {
23074
- "class": "row m-0 w-100"
23075
- }, CollectionsFilter()));
23548
+ "class": "col-lg-12 p-0 mb-4"
23549
+ }, /*#__PURE__*/React.createElement(ScrollMenu, {
23550
+ transitionBehavior: 'auto',
23551
+ wrapperClassName: '',
23552
+ itemClassName: '',
23553
+ scrollContainerClassName: 'scrollmenuclasssubscrollbar2'
23554
+ }, collectionstobevisible.map(function (item, index) {
23555
+ return /*#__PURE__*/React.createElement("div", {
23556
+ className: ' col-xl-12 p-0 col-lg-12 col-md-12 col-sm-12 w-100 mb-2 '
23557
+ }, /*#__PURE__*/React.createElement("div", {
23558
+ className: "".concat(filter_cssstyles.timeline_text, " ").concat(filter_cssstyles.filtercard) + ' p-0 cursor-pointer ',
23559
+ onClick: function onClick() {
23560
+ setCollectionFilterFunc(item.collectionid);
23561
+ },
23562
+ style: {
23563
+ color: item.isfilterselected == true ? sectionproperties.activecat_color : ''
23564
+ }
23565
+ }, /*#__PURE__*/React.createElement("div", {
23566
+ "class": "col-lg-12 allcentered mb-2"
23567
+ }, /*#__PURE__*/React.createElement("div", {
23568
+ style: {
23569
+ width: sectionproperties.filterimagewidthheight + '%',
23570
+ height: sectionproperties.filterimagewidthheight + '%'
23571
+ }
23572
+ }, /*#__PURE__*/React.createElement(Imagekitimagecomp, {
23573
+ urlEndpoint: ikimagecredcontext === null || ikimagecredcontext === void 0 ? void 0 : ikimagecredcontext.ikimageendpoint,
23574
+ publicKey: ikimagecredcontext === null || ikimagecredcontext === void 0 ? void 0 : ikimagecredcontext.ikimagepublickey,
23575
+ path: '/tr:w-' + sectionproperties.filterimage_tr + ',h-' + sectionproperties.filterimage_h + '/' + item.collectionlogo,
23576
+ style: {
23577
+ width: '100%',
23578
+ height: '100%',
23579
+ objectFit: 'cover',
23580
+ borderRadius: sectionproperties.filterimageborderradius + 'px'
23581
+ },
23582
+ loading: "lazy"
23583
+ }))), /*#__PURE__*/React.createElement("div", {
23584
+ "class": "row m-0 w-100"
23585
+ }, /*#__PURE__*/React.createElement("div", {
23586
+ "class": "col-10 text-start"
23587
+ }, /*#__PURE__*/React.createElement("p", {
23588
+ "class": ' m-0 p-0 '
23589
+ }, langdetect == 'en' ? item.title_en : item.title_ar)), /*#__PURE__*/React.createElement("div", {
23590
+ "class": "col-2 text-end"
23591
+ }, /*#__PURE__*/React.createElement("i", {
23592
+ "class": "h-100 allcentered"
23593
+ }, langdetect == 'en' ? /*#__PURE__*/React.createElement(BsChevronRight, null) : /*#__PURE__*/React.createElement(BsChevronRight, null))))));
23594
+ }))));
23076
23595
  };
23077
23596
 
23078
23597
  function ownKeys$2k(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -24864,7 +25383,12 @@ var CardsSection = function CardsSection(props) {
24864
25383
  var CardsSectionContent = function CardsSectionContent() {
24865
25384
  return /*#__PURE__*/React.createElement("div", {
24866
25385
  "class": ' row m-0 w-100 '
24867
- }, sectionproperties.showproductgroupbytitle == 'Show' && GroupByTitleSection(), sectionproperties.showFilter == 'show' && /*#__PURE__*/React.createElement("div", {
25386
+ }, authdetailsContext.instinfo.instid == '696691293c2a6' && sectionproperties.showFilter == 'show' && /*#__PURE__*/React.createElement(CollectionsFilterHorizontal, {
25387
+ sectionpropertiesprops: sectionproperties,
25388
+ actions: actions,
25389
+ openFilterSlider: openFilterSlider,
25390
+ setopenFilterSlider: setopenFilterSlider
25391
+ }), sectionproperties.showproductgroupbytitle == 'Show' && GroupByTitleSection(), sectionproperties.showFilter == 'show' && /*#__PURE__*/React.createElement("div", {
24868
25392
  className: sectionproperties.filterdirection == 'Horizontal' || sectionproperties.filterdirection == 'Collections Vertical' ? 'col-lg-12 d-flex p-0' : sectionproperties.numofcols == '2' ? 'col-lg-2 d-flex' : 'col-lg-3 d-flex'
24869
25393
  }, /*#__PURE__*/React.createElement(Filter$1, {
24870
25394
  sectionpropertiesprops: sectionproperties,