tabexseriescomponents 0.2.892 → 0.2.894

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
@@ -80410,10 +80410,6 @@ var Simpleproductcard = function Simpleproductcard(props) {
80410
80410
  Variant_Color_ImageObj = _useState0[0],
80411
80411
  setVariant_Color_ImageObj = _useState0[1];
80412
80412
  var authdetailsContext = props.actions.authdetailsContext;
80413
- var _useState1 = React.useState(false),
80414
- _useState10 = _slicedToArray__default["default"](_useState1, 2),
80415
- showquantity = _useState10[0],
80416
- setshowquantity = _useState10[1];
80417
80413
  var plainString = function plainString(html) {
80418
80414
  var divContainer = document.createElement('div');
80419
80415
  divContainer.innerHTML = html;
@@ -80433,13 +80429,6 @@ var Simpleproductcard = function Simpleproductcard(props) {
80433
80429
  React.useEffect(function () {
80434
80430
  setitem(props.cardinfoitemprops);
80435
80431
  }, [props.cardinfoitemprops]);
80436
- // useEffect(() => {
80437
- // if (item.quantity == 0) {
80438
- // setshowquantity(false);
80439
- // } else {
80440
- // setshowquantity(true);
80441
- // }
80442
- // }, [props.cardinfoitemprops]);
80443
80432
  React.useEffect(function () {
80444
80433
  var productImagetoBeSelected = '';
80445
80434
  var Tempitem = _objectSpread$6({}, item);
@@ -80557,32 +80546,6 @@ var Simpleproductcard = function Simpleproductcard(props) {
80557
80546
  color: sectionproperties.favBtnTextcoloronhover
80558
80547
  }
80559
80548
  }),
80560
- minus_quantitybtn_icon_container: glamor.css({
80561
- color: sectionproperties.cartBtnbgColor,
80562
- fontSize: 18,
80563
- flex: 1,
80564
- ':hover': {
80565
- color: sectionproperties.cartBtnbgColoronhover
80566
- }
80567
- }),
80568
- quantitybtn: glamor.css({
80569
- width: '70%',
80570
- height: sectionproperties.cartBtnHeight + 'px',
80571
- background: 'transparent',
80572
- borderRadius: sectionproperties.cart_btn_borderBottomLeftRadius + 'px',
80573
- color: sectionproperties.cartBtnbgColor,
80574
- fontSize: sectionproperties.cartBtnTextfontsize + 'px',
80575
- textTransform: sectionproperties.cartBtnTexttransform,
80576
- fontWeight: sectionproperties.cartBtnTextfontweight,
80577
- border: '1px solid ' + sectionproperties.cartBtnbgColor,
80578
- transition: '.3s',
80579
- // textDecoration: sectionproperties.cartbtntextdecoration == 'Underline' ? 'underline' : 'none',
80580
- ':hover': {
80581
- background: 'transparent',
80582
- color: sectionproperties.cartBtnbgColoronhover,
80583
- borderColor: sectionproperties.cartBtnbgColoronhover
80584
- }
80585
- }),
80586
80549
  cart_btn: glamor.css({
80587
80550
  width: sectionproperties.cartBtnWidth == 0 ? 'auto' : sectionproperties.cartBtnWidth + 'px',
80588
80551
  height: sectionproperties.cartBtnHeight + 'px',
@@ -80698,10 +80661,10 @@ var Simpleproductcard = function Simpleproductcard(props) {
80698
80661
  }
80699
80662
  })
80700
80663
  };
80701
- var _useState11 = React.useState(''),
80702
- _useState12 = _slicedToArray__default["default"](_useState11, 2),
80703
- secondimage = _useState12[0],
80704
- setsecondimage = _useState12[1];
80664
+ var _useState1 = React.useState(''),
80665
+ _useState10 = _slicedToArray__default["default"](_useState1, 2),
80666
+ secondimage = _useState10[0],
80667
+ setsecondimage = _useState10[1];
80705
80668
  React.useEffect(function () {
80706
80669
  var _props$cardinfoitempr;
80707
80670
  setitem(props.cardinfoitemprops);
@@ -80830,51 +80793,6 @@ var Simpleproductcard = function Simpleproductcard(props) {
80830
80793
  })), item.productid != '6811f1adebacc' && item.productid != '6811f2c05bd7f' ? langdetect == 'en' ? sectionproperties.cartBtnContentenglish : sectionproperties.cartBtnContentarabic : langdetect == 'en' ? 'COMING SOON' : 'قريباً');
80831
80794
  }
80832
80795
  };
80833
- var addtocartfuncquantity = function addtocartfuncquantity(type, quantity) {
80834
- var addtocardpayloadobj = {
80835
- functype: 'add',
80836
- productid: item.productid,
80837
- variantid: '',
80838
- quantity: quantity
80839
- };
80840
- var runfunc = false;
80841
- if (addtocardpayloadobj.productid.length != 0 && addtocardpayloadobj.quantity > 0) {
80842
- if (item.hasvariants == 1) {
80843
- if (addtocardpayloadobj.variantid.length != 0) {
80844
- runfunc = true;
80845
- } else {
80846
- NotificationManager.warning('', langdetect == 'en' ? 'Please Choose Product Options' : 'من فضلك اختر متغير');
80847
- }
80848
- } else {
80849
- runfunc = true;
80850
- }
80851
- } else {
80852
- NotificationManager.warning('', langdetect == 'en' ? 'Please Choose Quantity' : 'من فضلك اختر الكمية');
80853
- }
80854
- if (runfunc == true) {
80855
- AddtoCartContext(addtocardpayloadobj);
80856
- }
80857
- };
80858
- var addtocartbuttonrenderquantity = function addtocartbuttonrenderquantity() {
80859
- if (AddtoCartMutationContext.isLoading) {
80860
- var _AddtoCartMutationCon2;
80861
- if ((AddtoCartMutationContext === null || AddtoCartMutationContext === void 0 || (_AddtoCartMutationCon2 = AddtoCartMutationContext.variables) === null || _AddtoCartMutationCon2 === void 0 ? void 0 : _AddtoCartMutationCon2.productid) == item.productid) {
80862
- return /*#__PURE__*/React__default["default"].createElement("div", {
80863
- "class": ' d-flex align-items-center justify-content-center '
80864
- }, /*#__PURE__*/React__default["default"].createElement(reactCssfxLoading.CircularProgress, {
80865
- color: sectionproperties.cartBtnbgColor,
80866
- width: "20px",
80867
- height: "20px",
80868
- duration: "1s"
80869
- }));
80870
- } else {
80871
- return item.quantity;
80872
- }
80873
- }
80874
- if (!AddtoCartMutationContext.isLoading) {
80875
- return item.quantity;
80876
- }
80877
- };
80878
80796
  var Image = function Image(type) {
80879
80797
  var transition = false;
80880
80798
  if (sectionproperties.hideshowcardtransition == 'Show' && type != 'responsive') {
@@ -80909,10 +80827,10 @@ var Simpleproductcard = function Simpleproductcard(props) {
80909
80827
  }
80910
80828
  }));
80911
80829
  };
80912
- var _useState13 = React.useState(0),
80913
- _useState14 = _slicedToArray__default["default"](_useState13, 2),
80914
- clickCount = _useState14[0],
80915
- setClickCount = _useState14[1];
80830
+ var _useState11 = React.useState(0),
80831
+ _useState12 = _slicedToArray__default["default"](_useState11, 2),
80832
+ clickCount = _useState12[0],
80833
+ setClickCount = _useState12[1];
80916
80834
  var handleClick = function handleClick() {
80917
80835
  // Increase the click count by 1
80918
80836
  setClickCount(function (prevCount) {
@@ -81298,92 +81216,46 @@ var Simpleproductcard = function Simpleproductcard(props) {
81298
81216
  color: sectionproperties.quantitycolor,
81299
81217
  fontWeight: sectionproperties.quantityfontweight
81300
81218
  }
81301
- }, langdetect == 'en' ? sectionproperties.qtytextinen : sectionproperties.qtytextinar, " ", item.currentquantity, ' ', langdetect == 'en' ? sectionproperties.qtytextinen2 : sectionproperties.qtytextinar2)), sectionproperties.cartBtnShow == 'Show' && showquantity == false && /*#__PURE__*/React__default["default"].createElement("div", {
81219
+ }, langdetect == 'en' ? sectionproperties.qtytextinen : sectionproperties.qtytextinar, " ", item.currentquantity, ' ', langdetect == 'en' ? sectionproperties.qtytextinen2 : sectionproperties.qtytextinar2)), sectionproperties.cartBtnShow == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
81302
81220
  "class": "col-lg-12 p-0 d-flex align-items-center",
81303
81221
  style: {
81304
81222
  justifyContent: sectionproperties.productnamecentered == 'Centered' ? 'center' : 'start'
81305
81223
  }
81306
81224
  }, /*#__PURE__*/React__default["default"].createElement("p", {
81307
- "class": "".concat(card_cssstyles.cart_btn) + ' m-0 p-0 d-flex align-items-center justify-content-center mt-1 ',
81225
+ "class": "".concat(card_cssstyles.cart_btn) + ' m-0 p-0 d-flex align-items-center justify-content-center mt-1 '
81226
+ // onClick={() => {
81227
+ // var productidtobesend = null;
81228
+ // if (sectionproperties.urlwithproductname == 'Yes') {
81229
+ // productidtobesend = item.productendpointurl;
81230
+ // } else {
81231
+ // productidtobesend = item.productid;
81232
+ // }
81233
+ // cardonclickfunctionContext(sectionproperties?.onClickRoute, productidtobesend, props.fetchingtypeprops, item.collectionid);
81234
+ // // setShowProductInfoModalContext(true);
81235
+ // // setProductIdProdutInfoModalContext(item.productid);
81236
+ // }}
81237
+ ,
81308
81238
  onClick: function onClick() {
81309
- var _authdetailsContext$i3;
81310
- if ((authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i3 = authdetailsContext.instinfo) === null || _authdetailsContext$i3 === void 0 ? void 0 : _authdetailsContext$i3.contactinfo.instid) == '67d6bda67adf6') {
81311
- setshowquantity(true);
81239
+ if (sectionproperties.showvariantscont == 'Show') {
81240
+ addtocartfunc();
81312
81241
  } else {
81313
- if (sectionproperties.showvariantscont == 'Show') {
81242
+ if (sectionproperties.automaticaddtocart == 'Yes' && item.hasvariants == 0) {
81314
81243
  addtocartfunc();
81244
+ } else if (sectionproperties.automaticaddtocart == 'Yes' && item.hasvariants == 1) {
81245
+ cardonclickfunctionContext(sectionproperties === null || sectionproperties === void 0 ? void 0 : sectionproperties.onClickRoute, item, props.fetchingtypeprops, item.collectionid);
81246
+ // cardonclickfunctionContext(sectionproperties?.onClickRoute, item.productid, props.fetchingtypeprops, item.collectionid);
81315
81247
  } else {
81316
- if (sectionproperties.automaticaddtocart == 'Yes' && item.hasvariants == 0) {
81317
- addtocartfunc();
81318
- } else if (sectionproperties.automaticaddtocart == 'Yes' && item.hasvariants == 1) {
81319
- cardonclickfunctionContext(sectionproperties === null || sectionproperties === void 0 ? void 0 : sectionproperties.onClickRoute, item, props.fetchingtypeprops, item.collectionid);
81248
+ if (sectionproperties.urlwithproductname == 'Yes') {
81249
+ item.productendpointurl;
81320
81250
  } else {
81321
- if (sectionproperties.urlwithproductname == 'Yes') {
81322
- item.productendpointurl;
81323
- } else {
81324
- item.productid;
81325
- }
81326
- cardonclickfunctionContext(sectionproperties === null || sectionproperties === void 0 ? void 0 : sectionproperties.onClickRoute, item, props.fetchingtypeprops, item.collectionid);
81251
+ item.productid;
81327
81252
  }
81253
+ cardonclickfunctionContext(sectionproperties === null || sectionproperties === void 0 ? void 0 : sectionproperties.onClickRoute, item, props.fetchingtypeprops, item.collectionid);
81328
81254
  }
81329
81255
  }
81330
81256
  }
81331
- }, addtocartbuttonrender())), showquantity == true && /*#__PURE__*/React__default["default"].createElement("div", {
81332
- "class": "col-lg-12 p-0 d-flex align-items-center allcentered"
81333
- }, /*#__PURE__*/React__default["default"].createElement("div", {
81334
- "class": "".concat(card_cssstyles.quantitybtn) + ' p-0 d-flex align-items-center justify-content-center ',
81335
- style: {
81336
- direction: 'ltr'
81337
- }
81338
- }, /*#__PURE__*/React__default["default"].createElement("button", {
81339
- "class": "".concat(card_cssstyles.minus_quantitybtn_icon_container),
81340
- onClick: function onClick() {
81341
- if (item.hasvariants == 0) {
81342
- var tempitem = _objectSpread$6({}, item);
81343
- tempitem.quantity = parseInt(tempitem.quantity);
81344
- tempitem.quantity = tempitem.quantity - 1;
81345
- if (tempitem.quantity <= 0) {
81346
- tempitem.quantity = 0;
81347
- }
81348
- setitem(_objectSpread$6({}, tempitem));
81349
- addtocartfuncquantity('add', tempitem.quantity);
81350
- } else {
81351
- setShowProductInfoModalContext(true);
81352
- setProductIdProdutInfoModalContext(item.productid);
81353
- }
81354
- },
81355
- disabled: AddtoCartMutationContext.isLoading == true ? true : false
81356
- }, /*#__PURE__*/React__default["default"].createElement("i", {
81357
- "class": "h-100 allcentered minusbtn"
81358
- }, /*#__PURE__*/React__default["default"].createElement(FiMinus.FiMinus, null))), /*#__PURE__*/React__default["default"].createElement("span", {
81359
- "class": ' d-flex align-items-center justify-content-center ',
81360
- style: {
81361
- fontSize: 14,
81362
- fontWeight: 500,
81363
- color: sectionproperties.cartBtnbgColor,
81364
- flex: 1
81365
- }
81366
- }, addtocartbuttonrenderquantity()), /*#__PURE__*/React__default["default"].createElement("button", {
81367
- "class": "".concat(card_cssstyles.minus_quantitybtn_icon_container),
81368
- onClick: function onClick() {
81369
- if (item.hasvariants == 0) {
81370
- var tempitem = _objectSpread$6({}, item);
81371
- tempitem.quantity = parseInt(tempitem.quantity);
81372
- tempitem.quantity = tempitem.quantity + 1;
81373
- if (tempitem.quantity <= 0) {
81374
- tempitem.quantity = 0;
81375
- }
81376
- setitem(_objectSpread$6({}, tempitem));
81377
- addtocartfuncquantity('add', tempitem.quantity);
81378
- } else {
81379
- setShowProductInfoModalContext(true);
81380
- setProductIdProdutInfoModalContext(item.productid);
81381
- }
81382
- },
81383
- disabled: AddtoCartMutationContext.isLoading == true ? true : false
81384
- }, /*#__PURE__*/React__default["default"].createElement("i", {
81385
- "class": "h-100 allcentered addbtn"
81386
- }, /*#__PURE__*/React__default["default"].createElement(FiPlus.FiPlus, null))))))), sectionproperties.showrating == 'Show' && item.productcanrate == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
81257
+ // disabled={AddtoCartMutationContext.isLoading == true ? true : false}
81258
+ }, addtocartbuttonrender())))), sectionproperties.showrating == 'Show' && item.productcanrate == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
81387
81259
  "class": "col-lg-12 d-flex align-items-center p-0",
81388
81260
  style: {
81389
81261
  justifyContent: sectionproperties.productnamecentered == 'Centered' ? 'center' : 'start'
package/dist/index.esm.js CHANGED
@@ -80363,10 +80363,6 @@ var Simpleproductcard = function Simpleproductcard(props) {
80363
80363
  Variant_Color_ImageObj = _useState0[0],
80364
80364
  setVariant_Color_ImageObj = _useState0[1];
80365
80365
  var authdetailsContext = props.actions.authdetailsContext;
80366
- var _useState1 = useState(false),
80367
- _useState10 = _slicedToArray(_useState1, 2),
80368
- showquantity = _useState10[0],
80369
- setshowquantity = _useState10[1];
80370
80366
  var plainString = function plainString(html) {
80371
80367
  var divContainer = document.createElement('div');
80372
80368
  divContainer.innerHTML = html;
@@ -80386,13 +80382,6 @@ var Simpleproductcard = function Simpleproductcard(props) {
80386
80382
  useEffect(function () {
80387
80383
  setitem(props.cardinfoitemprops);
80388
80384
  }, [props.cardinfoitemprops]);
80389
- // useEffect(() => {
80390
- // if (item.quantity == 0) {
80391
- // setshowquantity(false);
80392
- // } else {
80393
- // setshowquantity(true);
80394
- // }
80395
- // }, [props.cardinfoitemprops]);
80396
80385
  useEffect(function () {
80397
80386
  var productImagetoBeSelected = '';
80398
80387
  var Tempitem = _objectSpread$6({}, item);
@@ -80510,32 +80499,6 @@ var Simpleproductcard = function Simpleproductcard(props) {
80510
80499
  color: sectionproperties.favBtnTextcoloronhover
80511
80500
  }
80512
80501
  }),
80513
- minus_quantitybtn_icon_container: css({
80514
- color: sectionproperties.cartBtnbgColor,
80515
- fontSize: 18,
80516
- flex: 1,
80517
- ':hover': {
80518
- color: sectionproperties.cartBtnbgColoronhover
80519
- }
80520
- }),
80521
- quantitybtn: css({
80522
- width: '70%',
80523
- height: sectionproperties.cartBtnHeight + 'px',
80524
- background: 'transparent',
80525
- borderRadius: sectionproperties.cart_btn_borderBottomLeftRadius + 'px',
80526
- color: sectionproperties.cartBtnbgColor,
80527
- fontSize: sectionproperties.cartBtnTextfontsize + 'px',
80528
- textTransform: sectionproperties.cartBtnTexttransform,
80529
- fontWeight: sectionproperties.cartBtnTextfontweight,
80530
- border: '1px solid ' + sectionproperties.cartBtnbgColor,
80531
- transition: '.3s',
80532
- // textDecoration: sectionproperties.cartbtntextdecoration == 'Underline' ? 'underline' : 'none',
80533
- ':hover': {
80534
- background: 'transparent',
80535
- color: sectionproperties.cartBtnbgColoronhover,
80536
- borderColor: sectionproperties.cartBtnbgColoronhover
80537
- }
80538
- }),
80539
80502
  cart_btn: css({
80540
80503
  width: sectionproperties.cartBtnWidth == 0 ? 'auto' : sectionproperties.cartBtnWidth + 'px',
80541
80504
  height: sectionproperties.cartBtnHeight + 'px',
@@ -80651,10 +80614,10 @@ var Simpleproductcard = function Simpleproductcard(props) {
80651
80614
  }
80652
80615
  })
80653
80616
  };
80654
- var _useState11 = useState(''),
80655
- _useState12 = _slicedToArray(_useState11, 2),
80656
- secondimage = _useState12[0],
80657
- setsecondimage = _useState12[1];
80617
+ var _useState1 = useState(''),
80618
+ _useState10 = _slicedToArray(_useState1, 2),
80619
+ secondimage = _useState10[0],
80620
+ setsecondimage = _useState10[1];
80658
80621
  useEffect(function () {
80659
80622
  var _props$cardinfoitempr;
80660
80623
  setitem(props.cardinfoitemprops);
@@ -80783,51 +80746,6 @@ var Simpleproductcard = function Simpleproductcard(props) {
80783
80746
  })), item.productid != '6811f1adebacc' && item.productid != '6811f2c05bd7f' ? langdetect == 'en' ? sectionproperties.cartBtnContentenglish : sectionproperties.cartBtnContentarabic : langdetect == 'en' ? 'COMING SOON' : 'قريباً');
80784
80747
  }
80785
80748
  };
80786
- var addtocartfuncquantity = function addtocartfuncquantity(type, quantity) {
80787
- var addtocardpayloadobj = {
80788
- functype: 'add',
80789
- productid: item.productid,
80790
- variantid: '',
80791
- quantity: quantity
80792
- };
80793
- var runfunc = false;
80794
- if (addtocardpayloadobj.productid.length != 0 && addtocardpayloadobj.quantity > 0) {
80795
- if (item.hasvariants == 1) {
80796
- if (addtocardpayloadobj.variantid.length != 0) {
80797
- runfunc = true;
80798
- } else {
80799
- NotificationManager.warning('', langdetect == 'en' ? 'Please Choose Product Options' : 'من فضلك اختر متغير');
80800
- }
80801
- } else {
80802
- runfunc = true;
80803
- }
80804
- } else {
80805
- NotificationManager.warning('', langdetect == 'en' ? 'Please Choose Quantity' : 'من فضلك اختر الكمية');
80806
- }
80807
- if (runfunc == true) {
80808
- AddtoCartContext(addtocardpayloadobj);
80809
- }
80810
- };
80811
- var addtocartbuttonrenderquantity = function addtocartbuttonrenderquantity() {
80812
- if (AddtoCartMutationContext.isLoading) {
80813
- var _AddtoCartMutationCon2;
80814
- if ((AddtoCartMutationContext === null || AddtoCartMutationContext === void 0 || (_AddtoCartMutationCon2 = AddtoCartMutationContext.variables) === null || _AddtoCartMutationCon2 === void 0 ? void 0 : _AddtoCartMutationCon2.productid) == item.productid) {
80815
- return /*#__PURE__*/React.createElement("div", {
80816
- "class": ' d-flex align-items-center justify-content-center '
80817
- }, /*#__PURE__*/React.createElement(CircularProgress, {
80818
- color: sectionproperties.cartBtnbgColor,
80819
- width: "20px",
80820
- height: "20px",
80821
- duration: "1s"
80822
- }));
80823
- } else {
80824
- return item.quantity;
80825
- }
80826
- }
80827
- if (!AddtoCartMutationContext.isLoading) {
80828
- return item.quantity;
80829
- }
80830
- };
80831
80749
  var Image = function Image(type) {
80832
80750
  var transition = false;
80833
80751
  if (sectionproperties.hideshowcardtransition == 'Show' && type != 'responsive') {
@@ -80862,10 +80780,10 @@ var Simpleproductcard = function Simpleproductcard(props) {
80862
80780
  }
80863
80781
  }));
80864
80782
  };
80865
- var _useState13 = useState(0),
80866
- _useState14 = _slicedToArray(_useState13, 2),
80867
- clickCount = _useState14[0],
80868
- setClickCount = _useState14[1];
80783
+ var _useState11 = useState(0),
80784
+ _useState12 = _slicedToArray(_useState11, 2),
80785
+ clickCount = _useState12[0],
80786
+ setClickCount = _useState12[1];
80869
80787
  var handleClick = function handleClick() {
80870
80788
  // Increase the click count by 1
80871
80789
  setClickCount(function (prevCount) {
@@ -81251,92 +81169,46 @@ var Simpleproductcard = function Simpleproductcard(props) {
81251
81169
  color: sectionproperties.quantitycolor,
81252
81170
  fontWeight: sectionproperties.quantityfontweight
81253
81171
  }
81254
- }, langdetect == 'en' ? sectionproperties.qtytextinen : sectionproperties.qtytextinar, " ", item.currentquantity, ' ', langdetect == 'en' ? sectionproperties.qtytextinen2 : sectionproperties.qtytextinar2)), sectionproperties.cartBtnShow == 'Show' && showquantity == false && /*#__PURE__*/React.createElement("div", {
81172
+ }, langdetect == 'en' ? sectionproperties.qtytextinen : sectionproperties.qtytextinar, " ", item.currentquantity, ' ', langdetect == 'en' ? sectionproperties.qtytextinen2 : sectionproperties.qtytextinar2)), sectionproperties.cartBtnShow == 'Show' && /*#__PURE__*/React.createElement("div", {
81255
81173
  "class": "col-lg-12 p-0 d-flex align-items-center",
81256
81174
  style: {
81257
81175
  justifyContent: sectionproperties.productnamecentered == 'Centered' ? 'center' : 'start'
81258
81176
  }
81259
81177
  }, /*#__PURE__*/React.createElement("p", {
81260
- "class": "".concat(card_cssstyles.cart_btn) + ' m-0 p-0 d-flex align-items-center justify-content-center mt-1 ',
81178
+ "class": "".concat(card_cssstyles.cart_btn) + ' m-0 p-0 d-flex align-items-center justify-content-center mt-1 '
81179
+ // onClick={() => {
81180
+ // var productidtobesend = null;
81181
+ // if (sectionproperties.urlwithproductname == 'Yes') {
81182
+ // productidtobesend = item.productendpointurl;
81183
+ // } else {
81184
+ // productidtobesend = item.productid;
81185
+ // }
81186
+ // cardonclickfunctionContext(sectionproperties?.onClickRoute, productidtobesend, props.fetchingtypeprops, item.collectionid);
81187
+ // // setShowProductInfoModalContext(true);
81188
+ // // setProductIdProdutInfoModalContext(item.productid);
81189
+ // }}
81190
+ ,
81261
81191
  onClick: function onClick() {
81262
- var _authdetailsContext$i3;
81263
- if ((authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i3 = authdetailsContext.instinfo) === null || _authdetailsContext$i3 === void 0 ? void 0 : _authdetailsContext$i3.contactinfo.instid) == '67d6bda67adf6') {
81264
- setshowquantity(true);
81192
+ if (sectionproperties.showvariantscont == 'Show') {
81193
+ addtocartfunc();
81265
81194
  } else {
81266
- if (sectionproperties.showvariantscont == 'Show') {
81195
+ if (sectionproperties.automaticaddtocart == 'Yes' && item.hasvariants == 0) {
81267
81196
  addtocartfunc();
81197
+ } else if (sectionproperties.automaticaddtocart == 'Yes' && item.hasvariants == 1) {
81198
+ cardonclickfunctionContext(sectionproperties === null || sectionproperties === void 0 ? void 0 : sectionproperties.onClickRoute, item, props.fetchingtypeprops, item.collectionid);
81199
+ // cardonclickfunctionContext(sectionproperties?.onClickRoute, item.productid, props.fetchingtypeprops, item.collectionid);
81268
81200
  } else {
81269
- if (sectionproperties.automaticaddtocart == 'Yes' && item.hasvariants == 0) {
81270
- addtocartfunc();
81271
- } else if (sectionproperties.automaticaddtocart == 'Yes' && item.hasvariants == 1) {
81272
- cardonclickfunctionContext(sectionproperties === null || sectionproperties === void 0 ? void 0 : sectionproperties.onClickRoute, item, props.fetchingtypeprops, item.collectionid);
81201
+ if (sectionproperties.urlwithproductname == 'Yes') {
81202
+ item.productendpointurl;
81273
81203
  } else {
81274
- if (sectionproperties.urlwithproductname == 'Yes') {
81275
- item.productendpointurl;
81276
- } else {
81277
- item.productid;
81278
- }
81279
- cardonclickfunctionContext(sectionproperties === null || sectionproperties === void 0 ? void 0 : sectionproperties.onClickRoute, item, props.fetchingtypeprops, item.collectionid);
81204
+ item.productid;
81280
81205
  }
81206
+ cardonclickfunctionContext(sectionproperties === null || sectionproperties === void 0 ? void 0 : sectionproperties.onClickRoute, item, props.fetchingtypeprops, item.collectionid);
81281
81207
  }
81282
81208
  }
81283
81209
  }
81284
- }, addtocartbuttonrender())), showquantity == true && /*#__PURE__*/React.createElement("div", {
81285
- "class": "col-lg-12 p-0 d-flex align-items-center allcentered"
81286
- }, /*#__PURE__*/React.createElement("div", {
81287
- "class": "".concat(card_cssstyles.quantitybtn) + ' p-0 d-flex align-items-center justify-content-center ',
81288
- style: {
81289
- direction: 'ltr'
81290
- }
81291
- }, /*#__PURE__*/React.createElement("button", {
81292
- "class": "".concat(card_cssstyles.minus_quantitybtn_icon_container),
81293
- onClick: function onClick() {
81294
- if (item.hasvariants == 0) {
81295
- var tempitem = _objectSpread$6({}, item);
81296
- tempitem.quantity = parseInt(tempitem.quantity);
81297
- tempitem.quantity = tempitem.quantity - 1;
81298
- if (tempitem.quantity <= 0) {
81299
- tempitem.quantity = 0;
81300
- }
81301
- setitem(_objectSpread$6({}, tempitem));
81302
- addtocartfuncquantity('add', tempitem.quantity);
81303
- } else {
81304
- setShowProductInfoModalContext(true);
81305
- setProductIdProdutInfoModalContext(item.productid);
81306
- }
81307
- },
81308
- disabled: AddtoCartMutationContext.isLoading == true ? true : false
81309
- }, /*#__PURE__*/React.createElement("i", {
81310
- "class": "h-100 allcentered minusbtn"
81311
- }, /*#__PURE__*/React.createElement(FiMinus, null))), /*#__PURE__*/React.createElement("span", {
81312
- "class": ' d-flex align-items-center justify-content-center ',
81313
- style: {
81314
- fontSize: 14,
81315
- fontWeight: 500,
81316
- color: sectionproperties.cartBtnbgColor,
81317
- flex: 1
81318
- }
81319
- }, addtocartbuttonrenderquantity()), /*#__PURE__*/React.createElement("button", {
81320
- "class": "".concat(card_cssstyles.minus_quantitybtn_icon_container),
81321
- onClick: function onClick() {
81322
- if (item.hasvariants == 0) {
81323
- var tempitem = _objectSpread$6({}, item);
81324
- tempitem.quantity = parseInt(tempitem.quantity);
81325
- tempitem.quantity = tempitem.quantity + 1;
81326
- if (tempitem.quantity <= 0) {
81327
- tempitem.quantity = 0;
81328
- }
81329
- setitem(_objectSpread$6({}, tempitem));
81330
- addtocartfuncquantity('add', tempitem.quantity);
81331
- } else {
81332
- setShowProductInfoModalContext(true);
81333
- setProductIdProdutInfoModalContext(item.productid);
81334
- }
81335
- },
81336
- disabled: AddtoCartMutationContext.isLoading == true ? true : false
81337
- }, /*#__PURE__*/React.createElement("i", {
81338
- "class": "h-100 allcentered addbtn"
81339
- }, /*#__PURE__*/React.createElement(FiPlus, null))))))), sectionproperties.showrating == 'Show' && item.productcanrate == 1 && /*#__PURE__*/React.createElement("div", {
81210
+ // disabled={AddtoCartMutationContext.isLoading == true ? true : false}
81211
+ }, addtocartbuttonrender())))), sectionproperties.showrating == 'Show' && item.productcanrate == 1 && /*#__PURE__*/React.createElement("div", {
81340
81212
  "class": "col-lg-12 d-flex align-items-center p-0",
81341
81213
  style: {
81342
81214
  justifyContent: sectionproperties.productnamecentered == 'Centered' ? 'center' : 'start'
package/dist/index.umd.js CHANGED
@@ -80220,10 +80220,6 @@
80220
80220
  Variant_Color_ImageObj = _useState0[0],
80221
80221
  setVariant_Color_ImageObj = _useState0[1];
80222
80222
  var authdetailsContext = props.actions.authdetailsContext;
80223
- var _useState1 = React.useState(false),
80224
- _useState10 = _slicedToArray__default["default"](_useState1, 2),
80225
- showquantity = _useState10[0],
80226
- setshowquantity = _useState10[1];
80227
80223
  var plainString = function plainString(html) {
80228
80224
  var divContainer = document.createElement('div');
80229
80225
  divContainer.innerHTML = html;
@@ -80243,13 +80239,6 @@
80243
80239
  React.useEffect(function () {
80244
80240
  setitem(props.cardinfoitemprops);
80245
80241
  }, [props.cardinfoitemprops]);
80246
- // useEffect(() => {
80247
- // if (item.quantity == 0) {
80248
- // setshowquantity(false);
80249
- // } else {
80250
- // setshowquantity(true);
80251
- // }
80252
- // }, [props.cardinfoitemprops]);
80253
80242
  React.useEffect(function () {
80254
80243
  var productImagetoBeSelected = '';
80255
80244
  var Tempitem = _objectSpread$6({}, item);
@@ -80367,32 +80356,6 @@
80367
80356
  color: sectionproperties.favBtnTextcoloronhover
80368
80357
  }
80369
80358
  }),
80370
- minus_quantitybtn_icon_container: glamor.css({
80371
- color: sectionproperties.cartBtnbgColor,
80372
- fontSize: 18,
80373
- flex: 1,
80374
- ':hover': {
80375
- color: sectionproperties.cartBtnbgColoronhover
80376
- }
80377
- }),
80378
- quantitybtn: glamor.css({
80379
- width: '70%',
80380
- height: sectionproperties.cartBtnHeight + 'px',
80381
- background: 'transparent',
80382
- borderRadius: sectionproperties.cart_btn_borderBottomLeftRadius + 'px',
80383
- color: sectionproperties.cartBtnbgColor,
80384
- fontSize: sectionproperties.cartBtnTextfontsize + 'px',
80385
- textTransform: sectionproperties.cartBtnTexttransform,
80386
- fontWeight: sectionproperties.cartBtnTextfontweight,
80387
- border: '1px solid ' + sectionproperties.cartBtnbgColor,
80388
- transition: '.3s',
80389
- // textDecoration: sectionproperties.cartbtntextdecoration == 'Underline' ? 'underline' : 'none',
80390
- ':hover': {
80391
- background: 'transparent',
80392
- color: sectionproperties.cartBtnbgColoronhover,
80393
- borderColor: sectionproperties.cartBtnbgColoronhover
80394
- }
80395
- }),
80396
80359
  cart_btn: glamor.css({
80397
80360
  width: sectionproperties.cartBtnWidth == 0 ? 'auto' : sectionproperties.cartBtnWidth + 'px',
80398
80361
  height: sectionproperties.cartBtnHeight + 'px',
@@ -80508,10 +80471,10 @@
80508
80471
  }
80509
80472
  })
80510
80473
  };
80511
- var _useState11 = React.useState(''),
80512
- _useState12 = _slicedToArray__default["default"](_useState11, 2),
80513
- secondimage = _useState12[0],
80514
- setsecondimage = _useState12[1];
80474
+ var _useState1 = React.useState(''),
80475
+ _useState10 = _slicedToArray__default["default"](_useState1, 2),
80476
+ secondimage = _useState10[0],
80477
+ setsecondimage = _useState10[1];
80515
80478
  React.useEffect(function () {
80516
80479
  var _props$cardinfoitempr;
80517
80480
  setitem(props.cardinfoitemprops);
@@ -80640,51 +80603,6 @@
80640
80603
  })), item.productid != '6811f1adebacc' && item.productid != '6811f2c05bd7f' ? langdetect == 'en' ? sectionproperties.cartBtnContentenglish : sectionproperties.cartBtnContentarabic : langdetect == 'en' ? 'COMING SOON' : 'قريباً');
80641
80604
  }
80642
80605
  };
80643
- var addtocartfuncquantity = function addtocartfuncquantity(type, quantity) {
80644
- var addtocardpayloadobj = {
80645
- functype: 'add',
80646
- productid: item.productid,
80647
- variantid: '',
80648
- quantity: quantity
80649
- };
80650
- var runfunc = false;
80651
- if (addtocardpayloadobj.productid.length != 0 && addtocardpayloadobj.quantity > 0) {
80652
- if (item.hasvariants == 1) {
80653
- if (addtocardpayloadobj.variantid.length != 0) {
80654
- runfunc = true;
80655
- } else {
80656
- NotificationManager.warning('', langdetect == 'en' ? 'Please Choose Product Options' : 'من فضلك اختر متغير');
80657
- }
80658
- } else {
80659
- runfunc = true;
80660
- }
80661
- } else {
80662
- NotificationManager.warning('', langdetect == 'en' ? 'Please Choose Quantity' : 'من فضلك اختر الكمية');
80663
- }
80664
- if (runfunc == true) {
80665
- AddtoCartContext(addtocardpayloadobj);
80666
- }
80667
- };
80668
- var addtocartbuttonrenderquantity = function addtocartbuttonrenderquantity() {
80669
- if (AddtoCartMutationContext.isLoading) {
80670
- var _AddtoCartMutationCon2;
80671
- if ((AddtoCartMutationContext === null || AddtoCartMutationContext === void 0 || (_AddtoCartMutationCon2 = AddtoCartMutationContext.variables) === null || _AddtoCartMutationCon2 === void 0 ? void 0 : _AddtoCartMutationCon2.productid) == item.productid) {
80672
- return /*#__PURE__*/React__default["default"].createElement("div", {
80673
- "class": ' d-flex align-items-center justify-content-center '
80674
- }, /*#__PURE__*/React__default["default"].createElement(reactCssfxLoading.CircularProgress, {
80675
- color: sectionproperties.cartBtnbgColor,
80676
- width: "20px",
80677
- height: "20px",
80678
- duration: "1s"
80679
- }));
80680
- } else {
80681
- return item.quantity;
80682
- }
80683
- }
80684
- if (!AddtoCartMutationContext.isLoading) {
80685
- return item.quantity;
80686
- }
80687
- };
80688
80606
  var Image = function Image(type) {
80689
80607
  var transition = false;
80690
80608
  if (sectionproperties.hideshowcardtransition == 'Show' && type != 'responsive') {
@@ -80719,10 +80637,10 @@
80719
80637
  }
80720
80638
  }));
80721
80639
  };
80722
- var _useState13 = React.useState(0),
80723
- _useState14 = _slicedToArray__default["default"](_useState13, 2),
80724
- clickCount = _useState14[0],
80725
- setClickCount = _useState14[1];
80640
+ var _useState11 = React.useState(0),
80641
+ _useState12 = _slicedToArray__default["default"](_useState11, 2),
80642
+ clickCount = _useState12[0],
80643
+ setClickCount = _useState12[1];
80726
80644
  var handleClick = function handleClick() {
80727
80645
  // Increase the click count by 1
80728
80646
  setClickCount(function (prevCount) {
@@ -81108,92 +81026,46 @@
81108
81026
  color: sectionproperties.quantitycolor,
81109
81027
  fontWeight: sectionproperties.quantityfontweight
81110
81028
  }
81111
- }, langdetect == 'en' ? sectionproperties.qtytextinen : sectionproperties.qtytextinar, " ", item.currentquantity, ' ', langdetect == 'en' ? sectionproperties.qtytextinen2 : sectionproperties.qtytextinar2)), sectionproperties.cartBtnShow == 'Show' && showquantity == false && /*#__PURE__*/React__default["default"].createElement("div", {
81029
+ }, langdetect == 'en' ? sectionproperties.qtytextinen : sectionproperties.qtytextinar, " ", item.currentquantity, ' ', langdetect == 'en' ? sectionproperties.qtytextinen2 : sectionproperties.qtytextinar2)), sectionproperties.cartBtnShow == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
81112
81030
  "class": "col-lg-12 p-0 d-flex align-items-center",
81113
81031
  style: {
81114
81032
  justifyContent: sectionproperties.productnamecentered == 'Centered' ? 'center' : 'start'
81115
81033
  }
81116
81034
  }, /*#__PURE__*/React__default["default"].createElement("p", {
81117
- "class": "".concat(card_cssstyles.cart_btn) + ' m-0 p-0 d-flex align-items-center justify-content-center mt-1 ',
81035
+ "class": "".concat(card_cssstyles.cart_btn) + ' m-0 p-0 d-flex align-items-center justify-content-center mt-1 '
81036
+ // onClick={() => {
81037
+ // var productidtobesend = null;
81038
+ // if (sectionproperties.urlwithproductname == 'Yes') {
81039
+ // productidtobesend = item.productendpointurl;
81040
+ // } else {
81041
+ // productidtobesend = item.productid;
81042
+ // }
81043
+ // cardonclickfunctionContext(sectionproperties?.onClickRoute, productidtobesend, props.fetchingtypeprops, item.collectionid);
81044
+ // // setShowProductInfoModalContext(true);
81045
+ // // setProductIdProdutInfoModalContext(item.productid);
81046
+ // }}
81047
+ ,
81118
81048
  onClick: function onClick() {
81119
- var _authdetailsContext$i3;
81120
- if ((authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i3 = authdetailsContext.instinfo) === null || _authdetailsContext$i3 === void 0 ? void 0 : _authdetailsContext$i3.contactinfo.instid) == '67d6bda67adf6') {
81121
- setshowquantity(true);
81049
+ if (sectionproperties.showvariantscont == 'Show') {
81050
+ addtocartfunc();
81122
81051
  } else {
81123
- if (sectionproperties.showvariantscont == 'Show') {
81052
+ if (sectionproperties.automaticaddtocart == 'Yes' && item.hasvariants == 0) {
81124
81053
  addtocartfunc();
81054
+ } else if (sectionproperties.automaticaddtocart == 'Yes' && item.hasvariants == 1) {
81055
+ cardonclickfunctionContext(sectionproperties === null || sectionproperties === void 0 ? void 0 : sectionproperties.onClickRoute, item, props.fetchingtypeprops, item.collectionid);
81056
+ // cardonclickfunctionContext(sectionproperties?.onClickRoute, item.productid, props.fetchingtypeprops, item.collectionid);
81125
81057
  } else {
81126
- if (sectionproperties.automaticaddtocart == 'Yes' && item.hasvariants == 0) {
81127
- addtocartfunc();
81128
- } else if (sectionproperties.automaticaddtocart == 'Yes' && item.hasvariants == 1) {
81129
- cardonclickfunctionContext(sectionproperties === null || sectionproperties === void 0 ? void 0 : sectionproperties.onClickRoute, item, props.fetchingtypeprops, item.collectionid);
81058
+ if (sectionproperties.urlwithproductname == 'Yes') {
81059
+ item.productendpointurl;
81130
81060
  } else {
81131
- if (sectionproperties.urlwithproductname == 'Yes') {
81132
- item.productendpointurl;
81133
- } else {
81134
- item.productid;
81135
- }
81136
- cardonclickfunctionContext(sectionproperties === null || sectionproperties === void 0 ? void 0 : sectionproperties.onClickRoute, item, props.fetchingtypeprops, item.collectionid);
81061
+ item.productid;
81137
81062
  }
81063
+ cardonclickfunctionContext(sectionproperties === null || sectionproperties === void 0 ? void 0 : sectionproperties.onClickRoute, item, props.fetchingtypeprops, item.collectionid);
81138
81064
  }
81139
81065
  }
81140
81066
  }
81141
- }, addtocartbuttonrender())), showquantity == true && /*#__PURE__*/React__default["default"].createElement("div", {
81142
- "class": "col-lg-12 p-0 d-flex align-items-center allcentered"
81143
- }, /*#__PURE__*/React__default["default"].createElement("div", {
81144
- "class": "".concat(card_cssstyles.quantitybtn) + ' p-0 d-flex align-items-center justify-content-center ',
81145
- style: {
81146
- direction: 'ltr'
81147
- }
81148
- }, /*#__PURE__*/React__default["default"].createElement("button", {
81149
- "class": "".concat(card_cssstyles.minus_quantitybtn_icon_container),
81150
- onClick: function onClick() {
81151
- if (item.hasvariants == 0) {
81152
- var tempitem = _objectSpread$6({}, item);
81153
- tempitem.quantity = parseInt(tempitem.quantity);
81154
- tempitem.quantity = tempitem.quantity - 1;
81155
- if (tempitem.quantity <= 0) {
81156
- tempitem.quantity = 0;
81157
- }
81158
- setitem(_objectSpread$6({}, tempitem));
81159
- addtocartfuncquantity('add', tempitem.quantity);
81160
- } else {
81161
- setShowProductInfoModalContext(true);
81162
- setProductIdProdutInfoModalContext(item.productid);
81163
- }
81164
- },
81165
- disabled: AddtoCartMutationContext.isLoading == true ? true : false
81166
- }, /*#__PURE__*/React__default["default"].createElement("i", {
81167
- "class": "h-100 allcentered minusbtn"
81168
- }, /*#__PURE__*/React__default["default"].createElement(FiMinus.FiMinus, null))), /*#__PURE__*/React__default["default"].createElement("span", {
81169
- "class": ' d-flex align-items-center justify-content-center ',
81170
- style: {
81171
- fontSize: 14,
81172
- fontWeight: 500,
81173
- color: sectionproperties.cartBtnbgColor,
81174
- flex: 1
81175
- }
81176
- }, addtocartbuttonrenderquantity()), /*#__PURE__*/React__default["default"].createElement("button", {
81177
- "class": "".concat(card_cssstyles.minus_quantitybtn_icon_container),
81178
- onClick: function onClick() {
81179
- if (item.hasvariants == 0) {
81180
- var tempitem = _objectSpread$6({}, item);
81181
- tempitem.quantity = parseInt(tempitem.quantity);
81182
- tempitem.quantity = tempitem.quantity + 1;
81183
- if (tempitem.quantity <= 0) {
81184
- tempitem.quantity = 0;
81185
- }
81186
- setitem(_objectSpread$6({}, tempitem));
81187
- addtocartfuncquantity('add', tempitem.quantity);
81188
- } else {
81189
- setShowProductInfoModalContext(true);
81190
- setProductIdProdutInfoModalContext(item.productid);
81191
- }
81192
- },
81193
- disabled: AddtoCartMutationContext.isLoading == true ? true : false
81194
- }, /*#__PURE__*/React__default["default"].createElement("i", {
81195
- "class": "h-100 allcentered addbtn"
81196
- }, /*#__PURE__*/React__default["default"].createElement(FiPlus.FiPlus, null))))))), sectionproperties.showrating == 'Show' && item.productcanrate == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
81067
+ // disabled={AddtoCartMutationContext.isLoading == true ? true : false}
81068
+ }, addtocartbuttonrender())))), sectionproperties.showrating == 'Show' && item.productcanrate == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
81197
81069
  "class": "col-lg-12 d-flex align-items-center p-0",
81198
81070
  style: {
81199
81071
  justifyContent: sectionproperties.productnamecentered == 'Centered' ? 'center' : 'start'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tabexseriescomponents",
3
- "version": "0.2.892",
3
+ "version": "0.2.894",
4
4
  "type": "module",
5
5
  "description": "your description",
6
6
  "main": "dist/index.cjs.js",