tabexseriescomponents 0.2.1342 → 0.2.1344

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
@@ -1767,7 +1767,7 @@ var Variantoptions = function Variantoptions(props) {
1767
1767
  color: '#62554a'
1768
1768
  }
1769
1769
  }, variantvalueidentifier))), /*#__PURE__*/React__default["default"].createElement("div", {
1770
- className: "col-lg-12 col-md-12 d-flex pb-md-3 justify-content-start align-items-start scrollhorixontalcontainer pt-1",
1770
+ className: "col-lg-12 col-md-12 d-flex pb-md-3 justify-content-start align-items-start scrollhorixontalcontainer pt-1 p-0",
1771
1771
  style: {
1772
1772
  paddingTop: sectionproperties.showRemovebutton == 'Show' ? '1rem' : 0
1773
1773
  }
@@ -2839,14 +2839,14 @@ var ProductExtras_charm = function ProductExtras_charm(props) {
2839
2839
  fontSize: 13
2840
2840
  }),
2841
2841
  variantButtonActive: glamor.css({
2842
- backgroundColor: '#4faa47',
2843
- border: '1px solid #4faa47',
2844
- color: '#fff'
2842
+ // backgroundColor: '#4faa47',
2843
+ border: '2px solid #4faa47'
2844
+ // color: '#fff',
2845
2845
  }),
2846
2846
  variantThumbnail: glamor.css({
2847
- width: 56,
2848
- height: 56,
2849
- objectFit: 'cover',
2847
+ width: 40,
2848
+ height: 40,
2849
+ // objectFit: 'cover',
2850
2850
  borderRadius: 12,
2851
2851
  marginBottom: 6
2852
2852
  }),
@@ -2857,9 +2857,10 @@ var ProductExtras_charm = function ProductExtras_charm(props) {
2857
2857
  variantPrice: glamor.css({
2858
2858
  lineHeight: 1.2,
2859
2859
  textAlign: 'center',
2860
- fontSize: 11,
2860
+ fontSize: 12,
2861
2861
  marginTop: 4,
2862
- opacity: 0.8
2862
+ opacity: 0.8,
2863
+ fontWeight: 500
2863
2864
  })
2864
2865
  };
2865
2866
  var getSelectedChoiceId = function getSelectedChoiceId(extraitem) {
@@ -2991,7 +2992,7 @@ var ProductExtras_charm = function ProductExtras_charm(props) {
2991
2992
  var extraChoices = getExtraChoices(item);
2992
2993
  var hasVariants = (item === null || item === void 0 || (_item$productinfo5 = item.productinfo) === null || _item$productinfo5 === void 0 ? void 0 : _item$productinfo5.hasvariants) == 1 && (extraChoices === null || extraChoices === void 0 ? void 0 : extraChoices.length) != 0;
2993
2994
  return /*#__PURE__*/React__default["default"].createElement("div", {
2994
- "class": "col-12 p-0"
2995
+ "class": "col-12 p-0 mb-3"
2995
2996
  }, /*#__PURE__*/React__default["default"].createElement(reactAccessibleAccordion.Accordion, {
2996
2997
  allowMultipleExpanded: true,
2997
2998
  allowZeroExpanded: true,
@@ -2999,7 +3000,7 @@ var ProductExtras_charm = function ProductExtras_charm(props) {
2999
3000
  }, /*#__PURE__*/React__default["default"].createElement(reactAccessibleAccordion.AccordionItem, {
3000
3001
  uuid: 0
3001
3002
  }, /*#__PURE__*/React__default["default"].createElement(reactAccessibleAccordion.AccordionItemHeading, null, /*#__PURE__*/React__default["default"].createElement(reactAccessibleAccordion.AccordionItemButton, null, /*#__PURE__*/React__default["default"].createElement("div", {
3002
- className: ' row m-0 p-0 mb-2 pl-md-3 pr-md-3 '
3003
+ className: ' row m-0 p-0 mb-2 '
3003
3004
  }, /*#__PURE__*/React__default["default"].createElement("div", {
3004
3005
  className: "col-lg-10 col-md-10 col-sm-10 p-0"
3005
3006
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -3025,11 +3026,15 @@ var ProductExtras_charm = function ProductExtras_charm(props) {
3025
3026
  if (state.expanded == true) {
3026
3027
  return /*#__PURE__*/React__default["default"].createElement("i", {
3027
3028
  className: ' collapsetitle h-100 d-flex align-items-center justify-content-end '
3028
- }, /*#__PURE__*/React__default["default"].createElement(FiChevronUp.FiChevronUp, null));
3029
+ }, /*#__PURE__*/React__default["default"].createElement(FiChevronUp.FiChevronUp, {
3030
+ color: '#000'
3031
+ }));
3029
3032
  } else {
3030
3033
  return /*#__PURE__*/React__default["default"].createElement("i", {
3031
3034
  className: ' collapsetitle h-100 d-flex align-items-center justify-content-end '
3032
- }, /*#__PURE__*/React__default["default"].createElement(FiChevronDown.FiChevronDown, null));
3035
+ }, /*#__PURE__*/React__default["default"].createElement(FiChevronDown.FiChevronDown, {
3036
+ color: '#000'
3037
+ }));
3033
3038
  }
3034
3039
  }))))), /*#__PURE__*/React__default["default"].createElement(reactAccessibleAccordion.AccordionItemPanel, {
3035
3040
  className: "p-0"
@@ -3055,8 +3060,6 @@ var ProductExtras_charm = function ProductExtras_charm(props) {
3055
3060
  "class": formstyles.variantThumbnail,
3056
3061
  className: formstyles.variantThumbnail
3057
3062
  }), /*#__PURE__*/React__default["default"].createElement("span", {
3058
- className: formstyles.variantLabel
3059
- }, choiceitem === null || choiceitem === void 0 ? void 0 : choiceitem.label), /*#__PURE__*/React__default["default"].createElement("span", {
3060
3063
  className: formstyles.variantPrice
3061
3064
  }, sectionproperties.removedecimals == 'Without Decimals and Separated With Comma' ? Math.floor((choiceitem === null || choiceitem === void 0 ? void 0 : choiceitem.price) || 0).toLocaleString() : choiceitem === null || choiceitem === void 0 ? void 0 : choiceitem.price, ' ', langdetect == 'en' ? authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_en : authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_ar)) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
3062
3065
  className: formstyles.variantLabel
@@ -11125,15 +11128,27 @@ var Productinfo = function Productinfo(props) {
11125
11128
  }
11126
11129
  }));
11127
11130
  var getprice_discountpriceprops_for_extras = function getprice_discountpriceprops_for_extras(productobj, quantity) {
11131
+ var variantid = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
11128
11132
  var price = 0;
11129
- price = productobj === null || productobj === void 0 ? void 0 : productobj.defaultprice;
11130
- // if (type == 'defaultprice') {
11131
- // price = productobj?.defaultprice;
11132
-
11133
- // } else if (type == 'defaultsaleprice') {
11134
- // price = productobj?.defaultsaleprice;
11135
-
11136
- // }
11133
+ console.log(variantid);
11134
+ console.log(productobj);
11135
+ if (productobj.hasvariants == 1) {
11136
+ if (variantid != null) {
11137
+ var _productobj$variants;
11138
+ if ((productobj === null || productobj === void 0 ? void 0 : productobj.variants) != undefined && (productobj === null || productobj === void 0 ? void 0 : productobj.variants) != null && Array.isArray(productobj === null || productobj === void 0 ? void 0 : productobj.variants) && (productobj === null || productobj === void 0 || (_productobj$variants = productobj.variants) === null || _productobj$variants === void 0 ? void 0 : _productobj$variants.length) != 0) {
11139
+ var _productobj$variants2;
11140
+ productobj === null || productobj === void 0 || (_productobj$variants2 = productobj.variants) === null || _productobj$variants2 === void 0 || _productobj$variants2.forEach(function (item, index) {
11141
+ if (item.variantid == variantid) {
11142
+ price = item.variantprice;
11143
+ }
11144
+ });
11145
+ }
11146
+ } else {
11147
+ price = productobj === null || productobj === void 0 ? void 0 : productobj.defaultprice;
11148
+ }
11149
+ } else {
11150
+ price = productobj === null || productobj === void 0 ? void 0 : productobj.defaultprice;
11151
+ }
11137
11152
  {
11138
11153
  if (price != undefined) {
11139
11154
  price = price * quantity;
@@ -11151,6 +11166,36 @@ var Productinfo = function Productinfo(props) {
11151
11166
  return 0;
11152
11167
  }
11153
11168
  };
11169
+
11170
+ // const getprice_discountpriceprops_for_extras = (productobj, quantity) => {
11171
+ // var price = 0;
11172
+
11173
+ // var withtotal = true;
11174
+ // price = productobj?.defaultprice;
11175
+ // // if (type == 'defaultprice') {
11176
+ // // price = productobj?.defaultprice;
11177
+
11178
+ // // } else if (type == 'defaultsaleprice') {
11179
+ // // price = productobj?.defaultsaleprice;
11180
+
11181
+ // // }
11182
+ // if (withtotal == true) {
11183
+ // if (price != undefined) {
11184
+ // price = price * quantity;
11185
+ // }
11186
+ // }
11187
+ // if (price != undefined) {
11188
+ // if (sectionproperties.removedecimals == 'Without Decimals') {
11189
+ // return parseFloat(Number(price).toFixed(2));
11190
+ // } else if (sectionproperties.removedecimals == 'Without Decimals and Separated With Comma') {
11191
+ // return Math.floor(price).toLocaleString();
11192
+ // } else {
11193
+ // return parseFloat(price);
11194
+ // }
11195
+ // } else {
11196
+ // return 0;
11197
+ // }
11198
+ // };
11154
11199
  var get_product_extras_price = function get_product_extras_price() {
11155
11200
  var _fetchProductInfoQuer63, _fetchProductInfoQuer64, _fetchcustomercartQue, _fetchcustomercartQue2, _fetchcustomercartQue3;
11156
11201
  var totalprice_extras_price = 0;
@@ -11167,7 +11212,7 @@ var Productinfo = function Productinfo(props) {
11167
11212
  }
11168
11213
  });
11169
11214
  extras_for_product === null || extras_for_product === void 0 || extras_for_product.forEach(function (cartitem_in, cartindex_in) {
11170
- var singleextraprice = getprice_discountpriceprops_for_extras(cartitem_in === null || cartitem_in === void 0 ? void 0 : cartitem_in.productinfo, cartitem_in === null || cartitem_in === void 0 ? void 0 : cartitem_in.quantity) * addtocardpayloadobj.quantity;
11215
+ var singleextraprice = getprice_discountpriceprops_for_extras(cartitem_in === null || cartitem_in === void 0 ? void 0 : cartitem_in.productinfo, cartitem_in === null || cartitem_in === void 0 ? void 0 : cartitem_in.quantity, cartitem_in.variantid) * addtocardpayloadobj.quantity;
11171
11216
  totalprice_extras_price = totalprice_extras_price + singleextraprice;
11172
11217
  });
11173
11218
  }
package/dist/index.esm.js CHANGED
@@ -1716,7 +1716,7 @@ var Variantoptions = function Variantoptions(props) {
1716
1716
  color: '#62554a'
1717
1717
  }
1718
1718
  }, variantvalueidentifier))), /*#__PURE__*/React.createElement("div", {
1719
- className: "col-lg-12 col-md-12 d-flex pb-md-3 justify-content-start align-items-start scrollhorixontalcontainer pt-1",
1719
+ className: "col-lg-12 col-md-12 d-flex pb-md-3 justify-content-start align-items-start scrollhorixontalcontainer pt-1 p-0",
1720
1720
  style: {
1721
1721
  paddingTop: sectionproperties.showRemovebutton == 'Show' ? '1rem' : 0
1722
1722
  }
@@ -2788,14 +2788,14 @@ var ProductExtras_charm = function ProductExtras_charm(props) {
2788
2788
  fontSize: 13
2789
2789
  }),
2790
2790
  variantButtonActive: css({
2791
- backgroundColor: '#4faa47',
2792
- border: '1px solid #4faa47',
2793
- color: '#fff'
2791
+ // backgroundColor: '#4faa47',
2792
+ border: '2px solid #4faa47'
2793
+ // color: '#fff',
2794
2794
  }),
2795
2795
  variantThumbnail: css({
2796
- width: 56,
2797
- height: 56,
2798
- objectFit: 'cover',
2796
+ width: 40,
2797
+ height: 40,
2798
+ // objectFit: 'cover',
2799
2799
  borderRadius: 12,
2800
2800
  marginBottom: 6
2801
2801
  }),
@@ -2806,9 +2806,10 @@ var ProductExtras_charm = function ProductExtras_charm(props) {
2806
2806
  variantPrice: css({
2807
2807
  lineHeight: 1.2,
2808
2808
  textAlign: 'center',
2809
- fontSize: 11,
2809
+ fontSize: 12,
2810
2810
  marginTop: 4,
2811
- opacity: 0.8
2811
+ opacity: 0.8,
2812
+ fontWeight: 500
2812
2813
  })
2813
2814
  };
2814
2815
  var getSelectedChoiceId = function getSelectedChoiceId(extraitem) {
@@ -2940,7 +2941,7 @@ var ProductExtras_charm = function ProductExtras_charm(props) {
2940
2941
  var extraChoices = getExtraChoices(item);
2941
2942
  var hasVariants = (item === null || item === void 0 || (_item$productinfo5 = item.productinfo) === null || _item$productinfo5 === void 0 ? void 0 : _item$productinfo5.hasvariants) == 1 && (extraChoices === null || extraChoices === void 0 ? void 0 : extraChoices.length) != 0;
2942
2943
  return /*#__PURE__*/React.createElement("div", {
2943
- "class": "col-12 p-0"
2944
+ "class": "col-12 p-0 mb-3"
2944
2945
  }, /*#__PURE__*/React.createElement(Accordion, {
2945
2946
  allowMultipleExpanded: true,
2946
2947
  allowZeroExpanded: true,
@@ -2948,7 +2949,7 @@ var ProductExtras_charm = function ProductExtras_charm(props) {
2948
2949
  }, /*#__PURE__*/React.createElement(AccordionItem, {
2949
2950
  uuid: 0
2950
2951
  }, /*#__PURE__*/React.createElement(AccordionItemHeading, null, /*#__PURE__*/React.createElement(AccordionItemButton, null, /*#__PURE__*/React.createElement("div", {
2951
- className: ' row m-0 p-0 mb-2 pl-md-3 pr-md-3 '
2952
+ className: ' row m-0 p-0 mb-2 '
2952
2953
  }, /*#__PURE__*/React.createElement("div", {
2953
2954
  className: "col-lg-10 col-md-10 col-sm-10 p-0"
2954
2955
  }, /*#__PURE__*/React.createElement("div", {
@@ -2974,11 +2975,15 @@ var ProductExtras_charm = function ProductExtras_charm(props) {
2974
2975
  if (state.expanded == true) {
2975
2976
  return /*#__PURE__*/React.createElement("i", {
2976
2977
  className: ' collapsetitle h-100 d-flex align-items-center justify-content-end '
2977
- }, /*#__PURE__*/React.createElement(FiChevronUp, null));
2978
+ }, /*#__PURE__*/React.createElement(FiChevronUp, {
2979
+ color: '#000'
2980
+ }));
2978
2981
  } else {
2979
2982
  return /*#__PURE__*/React.createElement("i", {
2980
2983
  className: ' collapsetitle h-100 d-flex align-items-center justify-content-end '
2981
- }, /*#__PURE__*/React.createElement(FiChevronDown, null));
2984
+ }, /*#__PURE__*/React.createElement(FiChevronDown, {
2985
+ color: '#000'
2986
+ }));
2982
2987
  }
2983
2988
  }))))), /*#__PURE__*/React.createElement(AccordionItemPanel, {
2984
2989
  className: "p-0"
@@ -3004,8 +3009,6 @@ var ProductExtras_charm = function ProductExtras_charm(props) {
3004
3009
  "class": formstyles.variantThumbnail,
3005
3010
  className: formstyles.variantThumbnail
3006
3011
  }), /*#__PURE__*/React.createElement("span", {
3007
- className: formstyles.variantLabel
3008
- }, choiceitem === null || choiceitem === void 0 ? void 0 : choiceitem.label), /*#__PURE__*/React.createElement("span", {
3009
3012
  className: formstyles.variantPrice
3010
3013
  }, sectionproperties.removedecimals == 'Without Decimals and Separated With Comma' ? Math.floor((choiceitem === null || choiceitem === void 0 ? void 0 : choiceitem.price) || 0).toLocaleString() : choiceitem === null || choiceitem === void 0 ? void 0 : choiceitem.price, ' ', langdetect == 'en' ? authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_en : authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_ar)) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
3011
3014
  className: formstyles.variantLabel
@@ -11074,15 +11077,27 @@ var Productinfo = function Productinfo(props) {
11074
11077
  }
11075
11078
  }));
11076
11079
  var getprice_discountpriceprops_for_extras = function getprice_discountpriceprops_for_extras(productobj, quantity) {
11080
+ var variantid = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
11077
11081
  var price = 0;
11078
- price = productobj === null || productobj === void 0 ? void 0 : productobj.defaultprice;
11079
- // if (type == 'defaultprice') {
11080
- // price = productobj?.defaultprice;
11081
-
11082
- // } else if (type == 'defaultsaleprice') {
11083
- // price = productobj?.defaultsaleprice;
11084
-
11085
- // }
11082
+ console.log(variantid);
11083
+ console.log(productobj);
11084
+ if (productobj.hasvariants == 1) {
11085
+ if (variantid != null) {
11086
+ var _productobj$variants;
11087
+ if ((productobj === null || productobj === void 0 ? void 0 : productobj.variants) != undefined && (productobj === null || productobj === void 0 ? void 0 : productobj.variants) != null && Array.isArray(productobj === null || productobj === void 0 ? void 0 : productobj.variants) && (productobj === null || productobj === void 0 || (_productobj$variants = productobj.variants) === null || _productobj$variants === void 0 ? void 0 : _productobj$variants.length) != 0) {
11088
+ var _productobj$variants2;
11089
+ productobj === null || productobj === void 0 || (_productobj$variants2 = productobj.variants) === null || _productobj$variants2 === void 0 || _productobj$variants2.forEach(function (item, index) {
11090
+ if (item.variantid == variantid) {
11091
+ price = item.variantprice;
11092
+ }
11093
+ });
11094
+ }
11095
+ } else {
11096
+ price = productobj === null || productobj === void 0 ? void 0 : productobj.defaultprice;
11097
+ }
11098
+ } else {
11099
+ price = productobj === null || productobj === void 0 ? void 0 : productobj.defaultprice;
11100
+ }
11086
11101
  {
11087
11102
  if (price != undefined) {
11088
11103
  price = price * quantity;
@@ -11100,6 +11115,36 @@ var Productinfo = function Productinfo(props) {
11100
11115
  return 0;
11101
11116
  }
11102
11117
  };
11118
+
11119
+ // const getprice_discountpriceprops_for_extras = (productobj, quantity) => {
11120
+ // var price = 0;
11121
+
11122
+ // var withtotal = true;
11123
+ // price = productobj?.defaultprice;
11124
+ // // if (type == 'defaultprice') {
11125
+ // // price = productobj?.defaultprice;
11126
+
11127
+ // // } else if (type == 'defaultsaleprice') {
11128
+ // // price = productobj?.defaultsaleprice;
11129
+
11130
+ // // }
11131
+ // if (withtotal == true) {
11132
+ // if (price != undefined) {
11133
+ // price = price * quantity;
11134
+ // }
11135
+ // }
11136
+ // if (price != undefined) {
11137
+ // if (sectionproperties.removedecimals == 'Without Decimals') {
11138
+ // return parseFloat(Number(price).toFixed(2));
11139
+ // } else if (sectionproperties.removedecimals == 'Without Decimals and Separated With Comma') {
11140
+ // return Math.floor(price).toLocaleString();
11141
+ // } else {
11142
+ // return parseFloat(price);
11143
+ // }
11144
+ // } else {
11145
+ // return 0;
11146
+ // }
11147
+ // };
11103
11148
  var get_product_extras_price = function get_product_extras_price() {
11104
11149
  var _fetchProductInfoQuer63, _fetchProductInfoQuer64, _fetchcustomercartQue, _fetchcustomercartQue2, _fetchcustomercartQue3;
11105
11150
  var totalprice_extras_price = 0;
@@ -11116,7 +11161,7 @@ var Productinfo = function Productinfo(props) {
11116
11161
  }
11117
11162
  });
11118
11163
  extras_for_product === null || extras_for_product === void 0 || extras_for_product.forEach(function (cartitem_in, cartindex_in) {
11119
- var singleextraprice = getprice_discountpriceprops_for_extras(cartitem_in === null || cartitem_in === void 0 ? void 0 : cartitem_in.productinfo, cartitem_in === null || cartitem_in === void 0 ? void 0 : cartitem_in.quantity) * addtocardpayloadobj.quantity;
11164
+ var singleextraprice = getprice_discountpriceprops_for_extras(cartitem_in === null || cartitem_in === void 0 ? void 0 : cartitem_in.productinfo, cartitem_in === null || cartitem_in === void 0 ? void 0 : cartitem_in.quantity, cartitem_in.variantid) * addtocardpayloadobj.quantity;
11120
11165
  totalprice_extras_price = totalprice_extras_price + singleextraprice;
11121
11166
  });
11122
11167
  }
package/dist/index.umd.js CHANGED
@@ -1573,7 +1573,7 @@
1573
1573
  color: '#62554a'
1574
1574
  }
1575
1575
  }, variantvalueidentifier))), /*#__PURE__*/React__default["default"].createElement("div", {
1576
- className: "col-lg-12 col-md-12 d-flex pb-md-3 justify-content-start align-items-start scrollhorixontalcontainer pt-1",
1576
+ className: "col-lg-12 col-md-12 d-flex pb-md-3 justify-content-start align-items-start scrollhorixontalcontainer pt-1 p-0",
1577
1577
  style: {
1578
1578
  paddingTop: sectionproperties.showRemovebutton == 'Show' ? '1rem' : 0
1579
1579
  }
@@ -2645,14 +2645,14 @@
2645
2645
  fontSize: 13
2646
2646
  }),
2647
2647
  variantButtonActive: glamor.css({
2648
- backgroundColor: '#4faa47',
2649
- border: '1px solid #4faa47',
2650
- color: '#fff'
2648
+ // backgroundColor: '#4faa47',
2649
+ border: '2px solid #4faa47'
2650
+ // color: '#fff',
2651
2651
  }),
2652
2652
  variantThumbnail: glamor.css({
2653
- width: 56,
2654
- height: 56,
2655
- objectFit: 'cover',
2653
+ width: 40,
2654
+ height: 40,
2655
+ // objectFit: 'cover',
2656
2656
  borderRadius: 12,
2657
2657
  marginBottom: 6
2658
2658
  }),
@@ -2663,9 +2663,10 @@
2663
2663
  variantPrice: glamor.css({
2664
2664
  lineHeight: 1.2,
2665
2665
  textAlign: 'center',
2666
- fontSize: 11,
2666
+ fontSize: 12,
2667
2667
  marginTop: 4,
2668
- opacity: 0.8
2668
+ opacity: 0.8,
2669
+ fontWeight: 500
2669
2670
  })
2670
2671
  };
2671
2672
  var getSelectedChoiceId = function getSelectedChoiceId(extraitem) {
@@ -2797,7 +2798,7 @@
2797
2798
  var extraChoices = getExtraChoices(item);
2798
2799
  var hasVariants = (item === null || item === void 0 || (_item$productinfo5 = item.productinfo) === null || _item$productinfo5 === void 0 ? void 0 : _item$productinfo5.hasvariants) == 1 && (extraChoices === null || extraChoices === void 0 ? void 0 : extraChoices.length) != 0;
2799
2800
  return /*#__PURE__*/React__default["default"].createElement("div", {
2800
- "class": "col-12 p-0"
2801
+ "class": "col-12 p-0 mb-3"
2801
2802
  }, /*#__PURE__*/React__default["default"].createElement(reactAccessibleAccordion.Accordion, {
2802
2803
  allowMultipleExpanded: true,
2803
2804
  allowZeroExpanded: true,
@@ -2805,7 +2806,7 @@
2805
2806
  }, /*#__PURE__*/React__default["default"].createElement(reactAccessibleAccordion.AccordionItem, {
2806
2807
  uuid: 0
2807
2808
  }, /*#__PURE__*/React__default["default"].createElement(reactAccessibleAccordion.AccordionItemHeading, null, /*#__PURE__*/React__default["default"].createElement(reactAccessibleAccordion.AccordionItemButton, null, /*#__PURE__*/React__default["default"].createElement("div", {
2808
- className: ' row m-0 p-0 mb-2 pl-md-3 pr-md-3 '
2809
+ className: ' row m-0 p-0 mb-2 '
2809
2810
  }, /*#__PURE__*/React__default["default"].createElement("div", {
2810
2811
  className: "col-lg-10 col-md-10 col-sm-10 p-0"
2811
2812
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -2831,11 +2832,15 @@
2831
2832
  if (state.expanded == true) {
2832
2833
  return /*#__PURE__*/React__default["default"].createElement("i", {
2833
2834
  className: ' collapsetitle h-100 d-flex align-items-center justify-content-end '
2834
- }, /*#__PURE__*/React__default["default"].createElement(FiChevronUp.FiChevronUp, null));
2835
+ }, /*#__PURE__*/React__default["default"].createElement(FiChevronUp.FiChevronUp, {
2836
+ color: '#000'
2837
+ }));
2835
2838
  } else {
2836
2839
  return /*#__PURE__*/React__default["default"].createElement("i", {
2837
2840
  className: ' collapsetitle h-100 d-flex align-items-center justify-content-end '
2838
- }, /*#__PURE__*/React__default["default"].createElement(FiChevronDown.FiChevronDown, null));
2841
+ }, /*#__PURE__*/React__default["default"].createElement(FiChevronDown.FiChevronDown, {
2842
+ color: '#000'
2843
+ }));
2839
2844
  }
2840
2845
  }))))), /*#__PURE__*/React__default["default"].createElement(reactAccessibleAccordion.AccordionItemPanel, {
2841
2846
  className: "p-0"
@@ -2861,8 +2866,6 @@
2861
2866
  "class": formstyles.variantThumbnail,
2862
2867
  className: formstyles.variantThumbnail
2863
2868
  }), /*#__PURE__*/React__default["default"].createElement("span", {
2864
- className: formstyles.variantLabel
2865
- }, choiceitem === null || choiceitem === void 0 ? void 0 : choiceitem.label), /*#__PURE__*/React__default["default"].createElement("span", {
2866
2869
  className: formstyles.variantPrice
2867
2870
  }, sectionproperties.removedecimals == 'Without Decimals and Separated With Comma' ? Math.floor((choiceitem === null || choiceitem === void 0 ? void 0 : choiceitem.price) || 0).toLocaleString() : choiceitem === null || choiceitem === void 0 ? void 0 : choiceitem.price, ' ', langdetect == 'en' ? authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_en : authdetailsContext === null || authdetailsContext === void 0 ? void 0 : authdetailsContext.currencyname_ar)) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("span", {
2868
2871
  className: formstyles.variantLabel
@@ -10931,15 +10934,27 @@
10931
10934
  }
10932
10935
  }));
10933
10936
  var getprice_discountpriceprops_for_extras = function getprice_discountpriceprops_for_extras(productobj, quantity) {
10937
+ var variantid = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
10934
10938
  var price = 0;
10935
- price = productobj === null || productobj === void 0 ? void 0 : productobj.defaultprice;
10936
- // if (type == 'defaultprice') {
10937
- // price = productobj?.defaultprice;
10938
-
10939
- // } else if (type == 'defaultsaleprice') {
10940
- // price = productobj?.defaultsaleprice;
10941
-
10942
- // }
10939
+ console.log(variantid);
10940
+ console.log(productobj);
10941
+ if (productobj.hasvariants == 1) {
10942
+ if (variantid != null) {
10943
+ var _productobj$variants;
10944
+ if ((productobj === null || productobj === void 0 ? void 0 : productobj.variants) != undefined && (productobj === null || productobj === void 0 ? void 0 : productobj.variants) != null && Array.isArray(productobj === null || productobj === void 0 ? void 0 : productobj.variants) && (productobj === null || productobj === void 0 || (_productobj$variants = productobj.variants) === null || _productobj$variants === void 0 ? void 0 : _productobj$variants.length) != 0) {
10945
+ var _productobj$variants2;
10946
+ productobj === null || productobj === void 0 || (_productobj$variants2 = productobj.variants) === null || _productobj$variants2 === void 0 || _productobj$variants2.forEach(function (item, index) {
10947
+ if (item.variantid == variantid) {
10948
+ price = item.variantprice;
10949
+ }
10950
+ });
10951
+ }
10952
+ } else {
10953
+ price = productobj === null || productobj === void 0 ? void 0 : productobj.defaultprice;
10954
+ }
10955
+ } else {
10956
+ price = productobj === null || productobj === void 0 ? void 0 : productobj.defaultprice;
10957
+ }
10943
10958
  {
10944
10959
  if (price != undefined) {
10945
10960
  price = price * quantity;
@@ -10957,6 +10972,36 @@
10957
10972
  return 0;
10958
10973
  }
10959
10974
  };
10975
+
10976
+ // const getprice_discountpriceprops_for_extras = (productobj, quantity) => {
10977
+ // var price = 0;
10978
+
10979
+ // var withtotal = true;
10980
+ // price = productobj?.defaultprice;
10981
+ // // if (type == 'defaultprice') {
10982
+ // // price = productobj?.defaultprice;
10983
+
10984
+ // // } else if (type == 'defaultsaleprice') {
10985
+ // // price = productobj?.defaultsaleprice;
10986
+
10987
+ // // }
10988
+ // if (withtotal == true) {
10989
+ // if (price != undefined) {
10990
+ // price = price * quantity;
10991
+ // }
10992
+ // }
10993
+ // if (price != undefined) {
10994
+ // if (sectionproperties.removedecimals == 'Without Decimals') {
10995
+ // return parseFloat(Number(price).toFixed(2));
10996
+ // } else if (sectionproperties.removedecimals == 'Without Decimals and Separated With Comma') {
10997
+ // return Math.floor(price).toLocaleString();
10998
+ // } else {
10999
+ // return parseFloat(price);
11000
+ // }
11001
+ // } else {
11002
+ // return 0;
11003
+ // }
11004
+ // };
10960
11005
  var get_product_extras_price = function get_product_extras_price() {
10961
11006
  var _fetchProductInfoQuer63, _fetchProductInfoQuer64, _fetchcustomercartQue, _fetchcustomercartQue2, _fetchcustomercartQue3;
10962
11007
  var totalprice_extras_price = 0;
@@ -10973,7 +11018,7 @@
10973
11018
  }
10974
11019
  });
10975
11020
  extras_for_product === null || extras_for_product === void 0 || extras_for_product.forEach(function (cartitem_in, cartindex_in) {
10976
- var singleextraprice = getprice_discountpriceprops_for_extras(cartitem_in === null || cartitem_in === void 0 ? void 0 : cartitem_in.productinfo, cartitem_in === null || cartitem_in === void 0 ? void 0 : cartitem_in.quantity) * addtocardpayloadobj.quantity;
11021
+ var singleextraprice = getprice_discountpriceprops_for_extras(cartitem_in === null || cartitem_in === void 0 ? void 0 : cartitem_in.productinfo, cartitem_in === null || cartitem_in === void 0 ? void 0 : cartitem_in.quantity, cartitem_in.variantid) * addtocardpayloadobj.quantity;
10977
11022
  totalprice_extras_price = totalprice_extras_price + singleextraprice;
10978
11023
  });
10979
11024
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tabexseriescomponents",
3
- "version": "0.2.1342",
3
+ "version": "0.2.1344",
4
4
  "type": "module",
5
5
  "description": "your description",
6
6
  "main": "dist/index.cjs.js",