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