tabexseriescomponents 0.0.724 → 0.0.726

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
@@ -10327,7 +10327,7 @@ var Select$3 = /*#__PURE__*/React__default["default"].lazy(function () {
10327
10327
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('react-select')); });
10328
10328
  });
10329
10329
  var Checkout = function Checkout(props) {
10330
- var _css, _fetchcustomercartQue65, _fetchcustomercartQue66, _fetchcustomercartQue67, _fetchcustomercartQue72, _fetchcustomercartQue73, _fetchcustomercartQue74, _fetchcustomercartQue75, _authdetailsContext$i4, _fetchcustomercartQue76, _fetchcustomercartQue78, _fetchcustomercartQue80, _fetchcustomercartQue82, _fetchcustomercartQue84, _authdetailsContext$i5, _fetchcustomercartQue86, _authdetailsContext$i6, _fetchcustomercartQue88, _authdetailsContext$i7, _fetchcustomercartQue90, _authdetailsContext$i8, _fetchcustomercartQue92, _fetchcustomercartQue94;
10330
+ var _css, _fetchcustomercartQue65, _fetchcustomercartQue66, _fetchcustomercartQue67, _fetchcustomercartQue72, _fetchcustomercartQue73, _fetchcustomercartQue74, _fetchcustomercartQue75, _fetchcustomercartQue76, _fetchcustomercartQue78, _fetchcustomercartQue80, _fetchcustomercartQue82, _fetchcustomercartQue84, _authdetailsContext$i4, _fetchcustomercartQue86, _authdetailsContext$i5, _fetchcustomercartQue88, _authdetailsContext$i6, _fetchcustomercartQue90, _authdetailsContext$i7, _fetchcustomercartQue92, _fetchcustomercartQue94;
10331
10331
  var _useState = React.useState(null),
10332
10332
  _useState2 = _slicedToArray__default["default"](_useState, 2);
10333
10333
  _useState2[0];
@@ -10378,7 +10378,10 @@ var Checkout = function Checkout(props) {
10378
10378
  _useState14 = _slicedToArray__default["default"](_useState13, 2),
10379
10379
  shippingmethods = _useState14[0],
10380
10380
  setshippingmethods = _useState14[1];
10381
- // const [orderextrafeilds, setorderextrafeilds] = useState([]);
10381
+ var _useState15 = React.useState([]),
10382
+ _useState16 = _slicedToArray__default["default"](_useState15, 2),
10383
+ orderextrafeilds = _useState16[0],
10384
+ setorderextrafeilds = _useState16[1];
10382
10385
  React.useEffect(function () {
10383
10386
  var _templatepropcontext$;
10384
10387
  var cartindex = templatepropcontext === null || templatepropcontext === void 0 || (_templatepropcontext$ = templatepropcontext.pagesnprop) === null || _templatepropcontext$ === void 0 ? void 0 : _templatepropcontext$.findIndex(function (x) {
@@ -10443,15 +10446,49 @@ var Checkout = function Checkout(props) {
10443
10446
  Pixel_EventsContext('InitiateCheckout', {});
10444
10447
  GeneralAPIMutationContext.mutate({
10445
10448
  endpointurl: '/InitiateCheckout',
10446
- mutateSuccesscallback: function mutateSuccesscallback() {}
10449
+ mutateSuccesscallback: function mutateSuccesscallback(data) {
10450
+ var _data$data;
10451
+ setUsedOrderExtraFieldsValues(data === null || data === void 0 || (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.order_extra_fields);
10452
+ }
10447
10453
  });
10448
10454
  }, [authdetailsContext]);
10455
+ var setUsedOrderExtraFieldsValues = function setUsedOrderExtraFieldsValues(order_extra_fields) {
10456
+ var usedOrderExtraFields = [];
10457
+ if (fetchcustomercartQueryContext.isSuccess && fetchcustomercartQueryContext != undefined && fetchcustomercartQueryContext.data != undefined && fetchcustomercartQueryContext.data.data != undefined && fetchcustomercartQueryContext.data.data.customercart != undefined && fetchcustomercartQueryContext.data.data.customercart.orderExtraFields != undefined && fetchcustomercartQueryContext.data.data.customercart.orderExtraFields != null && fetchcustomercartQueryContext.data.data.customercart.orderExtraFields != '') {
10458
+ var extraFieldsJson = fetchcustomercartQueryContext.data.data.customercart.orderExtraFields;
10459
+ try {
10460
+ // Check if extraFieldsJson is a valid JSON string
10461
+
10462
+ usedOrderExtraFields = JSON.parse(extraFieldsJson);
10463
+ } catch (error) {
10464
+ // In case of an error, log it and return an empty string
10465
+ console.error('Failed to parse JSON:', error);
10466
+ usedOrderExtraFields = [];
10467
+ }
10468
+ }
10469
+ var temporderExtraFields = _toConsumableArray__default["default"](order_extra_fields);
10470
+ temporderExtraFields === null || temporderExtraFields === void 0 || temporderExtraFields.forEach(function (item, index) {
10471
+ var _usedOrderExtraFields;
10472
+ var singleusedvalue = '';
10473
+ (_usedOrderExtraFields = usedOrderExtraFields) === null || _usedOrderExtraFields === void 0 || _usedOrderExtraFields.forEach(function (useditem) {
10474
+ if (useditem.id == item.id) {
10475
+ singleusedvalue = useditem.value;
10476
+ }
10477
+ });
10478
+ item.value = singleusedvalue;
10479
+ });
10480
+ setorderextrafeilds(_toConsumableArray__default["default"](temporderExtraFields));
10481
+ };
10449
10482
  React.useEffect(function () {
10450
10483
  if (fetchcustomercartQueryContext != undefined && fetchcustomercartQueryContext.data != undefined && fetchcustomercartQueryContext.data.data != undefined && fetchcustomercartQueryContext.data.data.customercart != undefined && fetchcustomercartQueryContext.data.data.customercart.cityid != undefined && fetchcustomercartQueryContext.data.data.customercart.cityid != null && fetchcustomercartQueryContext.data.data.customercart.cityid != '' && fetchcustomercartQueryContext.data.data.customercart.length != 0) {
10451
10484
  var _fetchcustomercartQue9;
10452
10485
  var cityid = fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue9 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue9 === void 0 || (_fetchcustomercartQue9 = _fetchcustomercartQue9.data) === null || _fetchcustomercartQue9 === void 0 ? void 0 : _fetchcustomercartQue9.customercart.cityid;
10453
10486
  fetchshippingmethods(cityid);
10454
10487
  }
10488
+ if (fetchcustomercartQueryContext.isSuccess) {
10489
+ setUsedOrderExtraFieldsValues(orderextrafeilds);
10490
+ }
10491
+
10455
10492
  // fetchorderextrafields();
10456
10493
  }, [fetchcustomercartQueryContext.data]);
10457
10494
  var fetchshippingmethods = function fetchshippingmethods(cityid) {
@@ -10478,6 +10515,7 @@ var Checkout = function Checkout(props) {
10478
10515
  // };
10479
10516
  var cartinfoupdater = function cartinfoupdater(key, value) {
10480
10517
  var _fetchcustomercartQue10, _fetchcustomercartQue11, _fetchcustomercartQue12, _fetchcustomercartQue13, _fetchcustomercartQue14, _fetchcustomercartQue15, _fetchcustomercartQue16, _fetchcustomercartQue17, _fetchcustomercartQue18, _fetchcustomercartQue19, _fetchcustomercartQue20;
10518
+ var OrderExtraFieldsToBeSentArr = returnOrderExtraFieldsArrayTobeSnetarr();
10481
10519
  var cartarr = queryClient.getQueryData('fetchcustomercart_API');
10482
10520
  cartarr.data.customercart[key] = value;
10483
10521
  queryClient.setQueryData('fetchcustomercart_API', cartarr);
@@ -10492,7 +10530,8 @@ var Checkout = function Checkout(props) {
10492
10530
  mobile: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue17 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue17 === void 0 || (_fetchcustomercartQue17 = _fetchcustomercartQue17.data) === null || _fetchcustomercartQue17 === void 0 ? void 0 : _fetchcustomercartQue17.customercart.mobile,
10493
10531
  notes: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue18 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue18 === void 0 || (_fetchcustomercartQue18 = _fetchcustomercartQue18.data) === null || _fetchcustomercartQue18 === void 0 ? void 0 : _fetchcustomercartQue18.customercart.notes,
10494
10532
  aff_code: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue19 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue19 === void 0 || (_fetchcustomercartQue19 = _fetchcustomercartQue19.data) === null || _fetchcustomercartQue19 === void 0 ? void 0 : _fetchcustomercartQue19.customercart.aff_code,
10495
- shippingmethod_id: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue20 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue20 === void 0 || (_fetchcustomercartQue20 = _fetchcustomercartQue20.data) === null || _fetchcustomercartQue20 === void 0 ? void 0 : _fetchcustomercartQue20.customercart.shippingmethod_id
10533
+ shippingmethod_id: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue20 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue20 === void 0 || (_fetchcustomercartQue20 = _fetchcustomercartQue20.data) === null || _fetchcustomercartQue20 === void 0 ? void 0 : _fetchcustomercartQue20.customercart.shippingmethod_id,
10534
+ orderextrafeilds: JSON.stringify(OrderExtraFieldsToBeSentArr)
10496
10535
  };
10497
10536
  if (key == 'address' || key == 'name' || key == 'mobile' || key == 'email' || key == 'notes' || key == 'aff_code') ; else {
10498
10537
  var _fetchcustomercartQue21;
@@ -10691,15 +10730,33 @@ var Checkout = function Checkout(props) {
10691
10730
  marginTop: sectionproperties.marginTopResp + 'px'
10692
10731
  }
10693
10732
  }));
10733
+ var returnOrderExtraFieldsArrayTobeSnetarr = function returnOrderExtraFieldsArrayTobeSnetarr() {
10734
+ var OrderExtraFieldsToBeSentArr = [];
10735
+ var temporderextrafeilds = _toConsumableArray__default["default"](orderextrafeilds);
10736
+ temporderextrafeilds === null || temporderextrafeilds === void 0 || temporderextrafeilds.forEach(function (item, index) {
10737
+ if (item.value != undefined && item != null && item.length != 0) {
10738
+ var obj = {
10739
+ id: item.id,
10740
+ title_en: item.title_en,
10741
+ title_ar: item.title_ar,
10742
+ value: item.value
10743
+ };
10744
+ OrderExtraFieldsToBeSentArr.push(obj);
10745
+ }
10746
+ });
10747
+ return OrderExtraFieldsToBeSentArr;
10748
+ };
10694
10749
  var addorderfuncrunner = /*#__PURE__*/function () {
10695
10750
  var _ref = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee() {
10696
10751
  var _fetchcustomercartQue22, _fetchcustomercartQue23, _fetchcustomercartQue24, _fetchcustomercartQue25, _fetchcustomercartQue26, _fetchcustomercartQue27, _fetchcustomercartQue28, _fetchcustomercartQue29, _fetchcustomercartQue30, _fetchcustomercartQue31, _fetchcustomercartQue32;
10752
+ var OrderExtraFieldsToBeSentArr;
10697
10753
  return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
10698
10754
  while (1) switch (_context.prev = _context.next) {
10699
10755
  case 0:
10700
10756
  // var temppayload = fetchcustomercartQueryContext?.data?.data?.customercart;
10701
10757
  // ChooseState_CountryMutationContext.mutate(payloadobj);
10702
10758
  // temppayload.endpointurl = '/ChooseState_Country';
10759
+ OrderExtraFieldsToBeSentArr = returnOrderExtraFieldsArrayTobeSnetarr();
10703
10760
  GeneralAPIMutationContext.mutate({
10704
10761
  endpointurl: '/ChooseState_Country',
10705
10762
  stateid: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue22 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue22 === void 0 || (_fetchcustomercartQue22 = _fetchcustomercartQue22.data) === null || _fetchcustomercartQue22 === void 0 ? void 0 : _fetchcustomercartQue22.customercart.stateid,
@@ -10713,6 +10770,7 @@ var Checkout = function Checkout(props) {
10713
10770
  notes: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue30 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue30 === void 0 || (_fetchcustomercartQue30 = _fetchcustomercartQue30.data) === null || _fetchcustomercartQue30 === void 0 ? void 0 : _fetchcustomercartQue30.customercart.notes,
10714
10771
  aff_code: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue31 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue31 === void 0 || (_fetchcustomercartQue31 = _fetchcustomercartQue31.data) === null || _fetchcustomercartQue31 === void 0 ? void 0 : _fetchcustomercartQue31.customercart.aff_code,
10715
10772
  shippingmethod_id: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue32 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue32 === void 0 || (_fetchcustomercartQue32 = _fetchcustomercartQue32.data) === null || _fetchcustomercartQue32 === void 0 ? void 0 : _fetchcustomercartQue32.customercart.shippingmethod_id,
10773
+ orderextrafeilds: JSON.stringify(OrderExtraFieldsToBeSentArr),
10716
10774
  mutateSuccesscallback: function mutateSuccesscallback(data, variables) {
10717
10775
  if (data.data.status) {
10718
10776
  var _fetchcustomercartQue33, _fetchcustomercartQue34;
@@ -10736,7 +10794,7 @@ var Checkout = function Checkout(props) {
10736
10794
  }
10737
10795
  }
10738
10796
  });
10739
- case 1:
10797
+ case 2:
10740
10798
  case "end":
10741
10799
  return _context.stop();
10742
10800
  }
@@ -11539,28 +11597,52 @@ var Checkout = function Checkout(props) {
11539
11597
  return /*#__PURE__*/React__default["default"].createElement("option", {
11540
11598
  value: item.id
11541
11599
  }, langdetect == 'en' ? item.name_en : item.name_ar);
11542
- }))))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i4 = authdetailsContext.instinfo) === null || _authdetailsContext$i4 === void 0 ? void 0 : _authdetailsContext$i4.contactinfo.instid) == '66b4a0338cb14' && /*#__PURE__*/React__default["default"].createElement("div", {
11600
+ }))))), (orderextrafeilds === null || orderextrafeilds === void 0 ? void 0 : orderextrafeilds.length) != 0 && /*#__PURE__*/React__default["default"].createElement("div", {
11543
11601
  className: "col-lg-12 p-0 w-100 py-3"
11544
11602
  }, /*#__PURE__*/React__default["default"].createElement("div", {
11545
- "class": "".concat(checkoutstyles.innersection) + ' w-100 mb-3 '
11603
+ "class": "".concat(checkoutstyles.innersection) + ' w-100 mb-3 py-3 '
11546
11604
  }, /*#__PURE__*/React__default["default"].createElement("div", {
11547
11605
  className: "row m-0 w-100 mb-3 pl-3 pr-3"
11548
- }, /*#__PURE__*/React__default["default"].createElement("div", {
11549
- className: "col-lg-4 col-md-12 mb-3"
11550
- }, /*#__PURE__*/React__default["default"].createElement("label", {
11551
- className: "".concat(checkoutstyles.input_label_name) + ' d-flex align-items-start '
11552
- }, langdetect == 'en' ? 'Event Date' : 'تاريخ الايفنت'), /*#__PURE__*/React__default["default"].createElement("input", {
11553
- type: 'date',
11554
- className: "".concat(formstyles.form_control, " ").concat(checkoutstyles.form_control)
11555
- // value={}
11556
- ,
11557
- onChange: function onChange(event) {
11558
- // cartinfoupdater('email', event.target.value);
11559
- },
11560
- style: {
11561
- boxShadow: 'none'
11606
+ }, orderextrafeilds === null || orderextrafeilds === void 0 ? void 0 : orderextrafeilds.map(function (item, index) {
11607
+ if (item.type == 'date') {
11608
+ return /*#__PURE__*/React__default["default"].createElement("div", {
11609
+ className: "col-lg-4 col-md-12 mb-3"
11610
+ }, /*#__PURE__*/React__default["default"].createElement("label", {
11611
+ className: "".concat(checkoutstyles.input_label_name) + ' d-flex align-items-start '
11612
+ }, langdetect == 'en' ? item.title_en : item.title_ar), /*#__PURE__*/React__default["default"].createElement("input", {
11613
+ type: 'date',
11614
+ className: "".concat(formstyles.form_control, " ").concat(checkoutstyles.form_control),
11615
+ value: item.value,
11616
+ onChange: function onChange(event) {
11617
+ var temporderextrafeilds = _toConsumableArray__default["default"](orderextrafeilds);
11618
+ temporderextrafeilds[index].value = event.target.value;
11619
+ setorderextrafeilds(_toConsumableArray__default["default"](temporderextrafeilds));
11620
+ },
11621
+ style: {
11622
+ boxShadow: 'none'
11623
+ }
11624
+ }));
11625
+ }
11626
+ if (item.type == 'time') {
11627
+ return /*#__PURE__*/React__default["default"].createElement("div", {
11628
+ className: "col-lg-4 col-md-12 mb-3"
11629
+ }, /*#__PURE__*/React__default["default"].createElement("label", {
11630
+ className: "".concat(checkoutstyles.input_label_name) + ' d-flex align-items-start '
11631
+ }, langdetect == 'en' ? item.title_en : item.title_ar), /*#__PURE__*/React__default["default"].createElement("input", {
11632
+ type: 'time',
11633
+ className: "".concat(formstyles.form_control, " ").concat(checkoutstyles.form_control),
11634
+ value: item.value,
11635
+ onChange: function onChange(event) {
11636
+ var temporderextrafeilds = _toConsumableArray__default["default"](orderextrafeilds);
11637
+ temporderextrafeilds[index].value = event.target.value;
11638
+ setorderextrafeilds(_toConsumableArray__default["default"](temporderextrafeilds));
11639
+ },
11640
+ style: {
11641
+ boxShadow: 'none'
11642
+ }
11643
+ }));
11562
11644
  }
11563
- }))))), sectionproperties.showpaymentfooter == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
11645
+ })))), sectionproperties.showpaymentfooter == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
11564
11646
  className: "col-lg-12 p-0 w-100"
11565
11647
  }, /*#__PURE__*/React__default["default"].createElement("div", {
11566
11648
  "class": "".concat(checkoutstyles.innersection) + ' w-100 mb-3 '
@@ -11684,7 +11766,7 @@ var Checkout = function Checkout(props) {
11684
11766
  d: "M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"
11685
11767
  })), /*#__PURE__*/React__default["default"].createElement("p", {
11686
11768
  className: "".concat(formstyles.checkbox_label) + ' ml-2 mb-0 wordbreak cursor-pointer mr-2 '
11687
- }, langdetect == 'en' ? sectionproperties.walletnameen : sectionproperties.walletnamear))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i5 = authdetailsContext.instinfo) === null || _authdetailsContext$i5 === void 0 ? void 0 : _authdetailsContext$i5.acceptForsaCard) == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
11769
+ }, langdetect == 'en' ? sectionproperties.walletnameen : sectionproperties.walletnamear))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i4 = authdetailsContext.instinfo) === null || _authdetailsContext$i4 === void 0 ? void 0 : _authdetailsContext$i4.acceptForsaCard) == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
11688
11770
  className: "col-xl-4 col-lg-4 col-md-12 mb-3"
11689
11771
  }, /*#__PURE__*/React__default["default"].createElement("label", {
11690
11772
  className: langdetect == 'en' ? "".concat(formstyles.checkbox, " ").concat(checkoutstyles.checkbox, " ") + ' d-flex mb-0 ' : "".concat(formstyles.checkbox, " ").concat(formstyles.checkboxtranslated, " ").concat(checkoutstyles.checkbox, " ") + ' d-flex mb-0 '
@@ -11705,7 +11787,7 @@ var Checkout = function Checkout(props) {
11705
11787
  d: "M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"
11706
11788
  })), /*#__PURE__*/React__default["default"].createElement("p", {
11707
11789
  className: "".concat(formstyles.checkbox_label) + ' ml-2 mb-0 wordbreak cursor-pointer mr-2 '
11708
- }, langdetect == 'en' ? 'Forsa' : ' Forsa'))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i6 = authdetailsContext.instinfo) === null || _authdetailsContext$i6 === void 0 ? void 0 : _authdetailsContext$i6.acceptonlinePaypal) == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
11790
+ }, langdetect == 'en' ? 'Forsa' : ' Forsa'))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i5 = authdetailsContext.instinfo) === null || _authdetailsContext$i5 === void 0 ? void 0 : _authdetailsContext$i5.acceptonlinePaypal) == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
11709
11791
  className: "col-xl-4 col-lg-4 col-md-12 mb-3"
11710
11792
  }, /*#__PURE__*/React__default["default"].createElement("label", {
11711
11793
  className: langdetect == 'en' ? "".concat(formstyles.checkbox, " ").concat(checkoutstyles.checkbox, " ") + ' d-flex mb-0 ' : "".concat(formstyles.checkbox, " ").concat(formstyles.checkboxtranslated, " ").concat(checkoutstyles.checkbox, " ") + ' d-flex mb-0 '
@@ -11726,7 +11808,7 @@ var Checkout = function Checkout(props) {
11726
11808
  d: "M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"
11727
11809
  })), /*#__PURE__*/React__default["default"].createElement("p", {
11728
11810
  className: "".concat(formstyles.checkbox_label, " + ' ml-2 mb-0 wordbreak cursor-pointer mr-2 '")
11729
- }, langdetect == 'en' ? 'Paypal' : ' Paypal'))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i7 = authdetailsContext.instinfo) === null || _authdetailsContext$i7 === void 0 ? void 0 : _authdetailsContext$i7.acceptBankInstallementsCard) == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
11811
+ }, langdetect == 'en' ? 'Paypal' : ' Paypal'))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i6 = authdetailsContext.instinfo) === null || _authdetailsContext$i6 === void 0 ? void 0 : _authdetailsContext$i6.acceptBankInstallementsCard) == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
11730
11812
  className: "col-xl-4 col-lg-4 col-md-12 mb-3"
11731
11813
  }, /*#__PURE__*/React__default["default"].createElement("label", {
11732
11814
  className: langdetect == 'en' ? "".concat(formstyles.checkbox, " ").concat(checkoutstyles.checkbox, " ") + ' d-flex mb-0 ' : "".concat(formstyles.checkbox, " ").concat(formstyles.checkboxtranslated, " ").concat(checkoutstyles.checkbox, " ") + ' d-flex mb-0 '
@@ -11747,7 +11829,7 @@ var Checkout = function Checkout(props) {
11747
11829
  d: "M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"
11748
11830
  })), /*#__PURE__*/React__default["default"].createElement("p", {
11749
11831
  className: "".concat(formstyles.checkbox_label) + ' ml-2 mb-0 wordbreak cursor-pointer mr-2 '
11750
- }, langdetect == 'en' ? 'Bank Installments' : ' التقسيط عن طريق البنك'))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i8 = authdetailsContext.instinfo) === null || _authdetailsContext$i8 === void 0 ? void 0 : _authdetailsContext$i8.acceptAmanCard) == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
11832
+ }, langdetect == 'en' ? 'Bank Installments' : ' التقسيط عن طريق البنك'))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i7 = authdetailsContext.instinfo) === null || _authdetailsContext$i7 === void 0 ? void 0 : _authdetailsContext$i7.acceptAmanCard) == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
11751
11833
  className: "col-xl-4 col-lg-4 col-md-12 mb-3"
11752
11834
  }, /*#__PURE__*/React__default["default"].createElement("label", {
11753
11835
  className: langdetect == 'en' ? "".concat(formstyles.checkbox, " ").concat(checkoutstyles.checkbox, " ") + ' d-flex mb-0 ' : "".concat(formstyles.checkbox, " ").concat(formstyles.checkboxtranslated, " ").concat(checkoutstyles.checkbox, " ") + ' d-flex mb-0 '
@@ -30984,8 +31066,8 @@ var Simpleheader = function Simpleheader(props) {
30984
31066
  }, /*#__PURE__*/React__default["default"].createElement("img", {
30985
31067
  src: 'https://tabex-co.com/storage/StaticImages/whatsapp.png',
30986
31068
  style: {
30987
- width: '40px',
30988
- height: '40px',
31069
+ width: sectionproperties.wabtnwidth + 'px',
31070
+ height: sectionproperties.wabtnsize + 'px',
30989
31071
  cursor: 'pointer'
30990
31072
  }
30991
31073
  }))), sectionproperties.showfooterphonenumber == 'Show' && /*#__PURE__*/React__default["default"].createElement("a", {
@@ -60542,7 +60624,7 @@ var DynamicForm = function DynamicForm(props) {
60542
60624
  }))), /*#__PURE__*/React__default["default"].createElement("div", {
60543
60625
  "class": "col-lg-12 d-flex align-items-cemter my-4",
60544
60626
  style: {
60545
- justifyContent: sectionproperties.generalbtn_position == 'Centered' ? 'center' : 'start'
60627
+ justifyContent: sectionproperties.generalbtn_position != 'Centered' ? 'start' : 'center'
60546
60628
  }
60547
60629
  }, /*#__PURE__*/React__default["default"].createElement("button", {
60548
60630
  onClick: function onClick() {
@@ -63421,7 +63503,7 @@ var ServicesectionCenteredcards = function ServicesectionCenteredcards(props) {
63421
63503
  window.open(cardinfoitem.btnlink, '_blank');
63422
63504
  }
63423
63505
  }
63424
- }, sectionproperties.imageposition == 'Top' && /*#__PURE__*/React__default["default"].createElement("div", {
63506
+ }, sectionproperties.imageposition == 'Top' && sectionproperties.image_width != 0 && /*#__PURE__*/React__default["default"].createElement("div", {
63425
63507
  "class": "col-lg-12 d-flex align-items-center p-0 w-100 h-100",
63426
63508
  style: {
63427
63509
  marginBottom: sectionproperties.image_mb + 'px',
@@ -63496,7 +63578,7 @@ var ServicesectionCenteredcards = function ServicesectionCenteredcards(props) {
63496
63578
  textAlign: sectionproperties.justifyContentCenter == 'Centered' ? 'center' : '',
63497
63579
  color: cardinfoitem.text2colorfromarray
63498
63580
  }
63499
- }, langdetect == 'en' ? cardinfoitem.cardobj_descripen : cardinfoitem.cardobj_descripar)), sectionproperties.imageposition == 'Bottom' && /*#__PURE__*/React__default["default"].createElement("div", {
63581
+ }, langdetect == 'en' ? cardinfoitem.cardobj_descripen : cardinfoitem.cardobj_descripar)), sectionproperties.imageposition == 'Bottom' && sectionproperties.image_width != 0 && /*#__PURE__*/React__default["default"].createElement("div", {
63500
63582
  "class": "col-lg-12 d-flex align-items-center p-0",
63501
63583
  style: {
63502
63584
  marginTop: sectionproperties.image_mb + 'px',
package/dist/index.esm.js CHANGED
@@ -10279,7 +10279,7 @@ var Select$3 = /*#__PURE__*/React.lazy(function () {
10279
10279
  return import('react-select');
10280
10280
  });
10281
10281
  var Checkout = function Checkout(props) {
10282
- var _css, _fetchcustomercartQue65, _fetchcustomercartQue66, _fetchcustomercartQue67, _fetchcustomercartQue72, _fetchcustomercartQue73, _fetchcustomercartQue74, _fetchcustomercartQue75, _authdetailsContext$i4, _fetchcustomercartQue76, _fetchcustomercartQue78, _fetchcustomercartQue80, _fetchcustomercartQue82, _fetchcustomercartQue84, _authdetailsContext$i5, _fetchcustomercartQue86, _authdetailsContext$i6, _fetchcustomercartQue88, _authdetailsContext$i7, _fetchcustomercartQue90, _authdetailsContext$i8, _fetchcustomercartQue92, _fetchcustomercartQue94;
10282
+ var _css, _fetchcustomercartQue65, _fetchcustomercartQue66, _fetchcustomercartQue67, _fetchcustomercartQue72, _fetchcustomercartQue73, _fetchcustomercartQue74, _fetchcustomercartQue75, _fetchcustomercartQue76, _fetchcustomercartQue78, _fetchcustomercartQue80, _fetchcustomercartQue82, _fetchcustomercartQue84, _authdetailsContext$i4, _fetchcustomercartQue86, _authdetailsContext$i5, _fetchcustomercartQue88, _authdetailsContext$i6, _fetchcustomercartQue90, _authdetailsContext$i7, _fetchcustomercartQue92, _fetchcustomercartQue94;
10283
10283
  var _useState = useState(null),
10284
10284
  _useState2 = _slicedToArray(_useState, 2);
10285
10285
  _useState2[0];
@@ -10330,7 +10330,10 @@ var Checkout = function Checkout(props) {
10330
10330
  _useState14 = _slicedToArray(_useState13, 2),
10331
10331
  shippingmethods = _useState14[0],
10332
10332
  setshippingmethods = _useState14[1];
10333
- // const [orderextrafeilds, setorderextrafeilds] = useState([]);
10333
+ var _useState15 = useState([]),
10334
+ _useState16 = _slicedToArray(_useState15, 2),
10335
+ orderextrafeilds = _useState16[0],
10336
+ setorderextrafeilds = _useState16[1];
10334
10337
  useEffect(function () {
10335
10338
  var _templatepropcontext$;
10336
10339
  var cartindex = templatepropcontext === null || templatepropcontext === void 0 || (_templatepropcontext$ = templatepropcontext.pagesnprop) === null || _templatepropcontext$ === void 0 ? void 0 : _templatepropcontext$.findIndex(function (x) {
@@ -10395,15 +10398,49 @@ var Checkout = function Checkout(props) {
10395
10398
  Pixel_EventsContext('InitiateCheckout', {});
10396
10399
  GeneralAPIMutationContext.mutate({
10397
10400
  endpointurl: '/InitiateCheckout',
10398
- mutateSuccesscallback: function mutateSuccesscallback() {}
10401
+ mutateSuccesscallback: function mutateSuccesscallback(data) {
10402
+ var _data$data;
10403
+ setUsedOrderExtraFieldsValues(data === null || data === void 0 || (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.order_extra_fields);
10404
+ }
10399
10405
  });
10400
10406
  }, [authdetailsContext]);
10407
+ var setUsedOrderExtraFieldsValues = function setUsedOrderExtraFieldsValues(order_extra_fields) {
10408
+ var usedOrderExtraFields = [];
10409
+ if (fetchcustomercartQueryContext.isSuccess && fetchcustomercartQueryContext != undefined && fetchcustomercartQueryContext.data != undefined && fetchcustomercartQueryContext.data.data != undefined && fetchcustomercartQueryContext.data.data.customercart != undefined && fetchcustomercartQueryContext.data.data.customercart.orderExtraFields != undefined && fetchcustomercartQueryContext.data.data.customercart.orderExtraFields != null && fetchcustomercartQueryContext.data.data.customercart.orderExtraFields != '') {
10410
+ var extraFieldsJson = fetchcustomercartQueryContext.data.data.customercart.orderExtraFields;
10411
+ try {
10412
+ // Check if extraFieldsJson is a valid JSON string
10413
+
10414
+ usedOrderExtraFields = JSON.parse(extraFieldsJson);
10415
+ } catch (error) {
10416
+ // In case of an error, log it and return an empty string
10417
+ console.error('Failed to parse JSON:', error);
10418
+ usedOrderExtraFields = [];
10419
+ }
10420
+ }
10421
+ var temporderExtraFields = _toConsumableArray(order_extra_fields);
10422
+ temporderExtraFields === null || temporderExtraFields === void 0 || temporderExtraFields.forEach(function (item, index) {
10423
+ var _usedOrderExtraFields;
10424
+ var singleusedvalue = '';
10425
+ (_usedOrderExtraFields = usedOrderExtraFields) === null || _usedOrderExtraFields === void 0 || _usedOrderExtraFields.forEach(function (useditem) {
10426
+ if (useditem.id == item.id) {
10427
+ singleusedvalue = useditem.value;
10428
+ }
10429
+ });
10430
+ item.value = singleusedvalue;
10431
+ });
10432
+ setorderextrafeilds(_toConsumableArray(temporderExtraFields));
10433
+ };
10401
10434
  useEffect(function () {
10402
10435
  if (fetchcustomercartQueryContext != undefined && fetchcustomercartQueryContext.data != undefined && fetchcustomercartQueryContext.data.data != undefined && fetchcustomercartQueryContext.data.data.customercart != undefined && fetchcustomercartQueryContext.data.data.customercart.cityid != undefined && fetchcustomercartQueryContext.data.data.customercart.cityid != null && fetchcustomercartQueryContext.data.data.customercart.cityid != '' && fetchcustomercartQueryContext.data.data.customercart.length != 0) {
10403
10436
  var _fetchcustomercartQue9;
10404
10437
  var cityid = fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue9 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue9 === void 0 || (_fetchcustomercartQue9 = _fetchcustomercartQue9.data) === null || _fetchcustomercartQue9 === void 0 ? void 0 : _fetchcustomercartQue9.customercart.cityid;
10405
10438
  fetchshippingmethods(cityid);
10406
10439
  }
10440
+ if (fetchcustomercartQueryContext.isSuccess) {
10441
+ setUsedOrderExtraFieldsValues(orderextrafeilds);
10442
+ }
10443
+
10407
10444
  // fetchorderextrafields();
10408
10445
  }, [fetchcustomercartQueryContext.data]);
10409
10446
  var fetchshippingmethods = function fetchshippingmethods(cityid) {
@@ -10430,6 +10467,7 @@ var Checkout = function Checkout(props) {
10430
10467
  // };
10431
10468
  var cartinfoupdater = function cartinfoupdater(key, value) {
10432
10469
  var _fetchcustomercartQue10, _fetchcustomercartQue11, _fetchcustomercartQue12, _fetchcustomercartQue13, _fetchcustomercartQue14, _fetchcustomercartQue15, _fetchcustomercartQue16, _fetchcustomercartQue17, _fetchcustomercartQue18, _fetchcustomercartQue19, _fetchcustomercartQue20;
10470
+ var OrderExtraFieldsToBeSentArr = returnOrderExtraFieldsArrayTobeSnetarr();
10433
10471
  var cartarr = queryClient.getQueryData('fetchcustomercart_API');
10434
10472
  cartarr.data.customercart[key] = value;
10435
10473
  queryClient.setQueryData('fetchcustomercart_API', cartarr);
@@ -10444,7 +10482,8 @@ var Checkout = function Checkout(props) {
10444
10482
  mobile: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue17 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue17 === void 0 || (_fetchcustomercartQue17 = _fetchcustomercartQue17.data) === null || _fetchcustomercartQue17 === void 0 ? void 0 : _fetchcustomercartQue17.customercart.mobile,
10445
10483
  notes: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue18 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue18 === void 0 || (_fetchcustomercartQue18 = _fetchcustomercartQue18.data) === null || _fetchcustomercartQue18 === void 0 ? void 0 : _fetchcustomercartQue18.customercart.notes,
10446
10484
  aff_code: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue19 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue19 === void 0 || (_fetchcustomercartQue19 = _fetchcustomercartQue19.data) === null || _fetchcustomercartQue19 === void 0 ? void 0 : _fetchcustomercartQue19.customercart.aff_code,
10447
- shippingmethod_id: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue20 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue20 === void 0 || (_fetchcustomercartQue20 = _fetchcustomercartQue20.data) === null || _fetchcustomercartQue20 === void 0 ? void 0 : _fetchcustomercartQue20.customercart.shippingmethod_id
10485
+ shippingmethod_id: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue20 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue20 === void 0 || (_fetchcustomercartQue20 = _fetchcustomercartQue20.data) === null || _fetchcustomercartQue20 === void 0 ? void 0 : _fetchcustomercartQue20.customercart.shippingmethod_id,
10486
+ orderextrafeilds: JSON.stringify(OrderExtraFieldsToBeSentArr)
10448
10487
  };
10449
10488
  if (key == 'address' || key == 'name' || key == 'mobile' || key == 'email' || key == 'notes' || key == 'aff_code') ; else {
10450
10489
  var _fetchcustomercartQue21;
@@ -10643,15 +10682,33 @@ var Checkout = function Checkout(props) {
10643
10682
  marginTop: sectionproperties.marginTopResp + 'px'
10644
10683
  }
10645
10684
  }));
10685
+ var returnOrderExtraFieldsArrayTobeSnetarr = function returnOrderExtraFieldsArrayTobeSnetarr() {
10686
+ var OrderExtraFieldsToBeSentArr = [];
10687
+ var temporderextrafeilds = _toConsumableArray(orderextrafeilds);
10688
+ temporderextrafeilds === null || temporderextrafeilds === void 0 || temporderextrafeilds.forEach(function (item, index) {
10689
+ if (item.value != undefined && item != null && item.length != 0) {
10690
+ var obj = {
10691
+ id: item.id,
10692
+ title_en: item.title_en,
10693
+ title_ar: item.title_ar,
10694
+ value: item.value
10695
+ };
10696
+ OrderExtraFieldsToBeSentArr.push(obj);
10697
+ }
10698
+ });
10699
+ return OrderExtraFieldsToBeSentArr;
10700
+ };
10646
10701
  var addorderfuncrunner = /*#__PURE__*/function () {
10647
10702
  var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
10648
10703
  var _fetchcustomercartQue22, _fetchcustomercartQue23, _fetchcustomercartQue24, _fetchcustomercartQue25, _fetchcustomercartQue26, _fetchcustomercartQue27, _fetchcustomercartQue28, _fetchcustomercartQue29, _fetchcustomercartQue30, _fetchcustomercartQue31, _fetchcustomercartQue32;
10704
+ var OrderExtraFieldsToBeSentArr;
10649
10705
  return _regeneratorRuntime.wrap(function _callee$(_context) {
10650
10706
  while (1) switch (_context.prev = _context.next) {
10651
10707
  case 0:
10652
10708
  // var temppayload = fetchcustomercartQueryContext?.data?.data?.customercart;
10653
10709
  // ChooseState_CountryMutationContext.mutate(payloadobj);
10654
10710
  // temppayload.endpointurl = '/ChooseState_Country';
10711
+ OrderExtraFieldsToBeSentArr = returnOrderExtraFieldsArrayTobeSnetarr();
10655
10712
  GeneralAPIMutationContext.mutate({
10656
10713
  endpointurl: '/ChooseState_Country',
10657
10714
  stateid: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue22 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue22 === void 0 || (_fetchcustomercartQue22 = _fetchcustomercartQue22.data) === null || _fetchcustomercartQue22 === void 0 ? void 0 : _fetchcustomercartQue22.customercart.stateid,
@@ -10665,6 +10722,7 @@ var Checkout = function Checkout(props) {
10665
10722
  notes: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue30 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue30 === void 0 || (_fetchcustomercartQue30 = _fetchcustomercartQue30.data) === null || _fetchcustomercartQue30 === void 0 ? void 0 : _fetchcustomercartQue30.customercart.notes,
10666
10723
  aff_code: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue31 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue31 === void 0 || (_fetchcustomercartQue31 = _fetchcustomercartQue31.data) === null || _fetchcustomercartQue31 === void 0 ? void 0 : _fetchcustomercartQue31.customercart.aff_code,
10667
10724
  shippingmethod_id: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue32 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue32 === void 0 || (_fetchcustomercartQue32 = _fetchcustomercartQue32.data) === null || _fetchcustomercartQue32 === void 0 ? void 0 : _fetchcustomercartQue32.customercart.shippingmethod_id,
10725
+ orderextrafeilds: JSON.stringify(OrderExtraFieldsToBeSentArr),
10668
10726
  mutateSuccesscallback: function mutateSuccesscallback(data, variables) {
10669
10727
  if (data.data.status) {
10670
10728
  var _fetchcustomercartQue33, _fetchcustomercartQue34;
@@ -10688,7 +10746,7 @@ var Checkout = function Checkout(props) {
10688
10746
  }
10689
10747
  }
10690
10748
  });
10691
- case 1:
10749
+ case 2:
10692
10750
  case "end":
10693
10751
  return _context.stop();
10694
10752
  }
@@ -11491,28 +11549,52 @@ var Checkout = function Checkout(props) {
11491
11549
  return /*#__PURE__*/React.createElement("option", {
11492
11550
  value: item.id
11493
11551
  }, langdetect == 'en' ? item.name_en : item.name_ar);
11494
- }))))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i4 = authdetailsContext.instinfo) === null || _authdetailsContext$i4 === void 0 ? void 0 : _authdetailsContext$i4.contactinfo.instid) == '66b4a0338cb14' && /*#__PURE__*/React.createElement("div", {
11552
+ }))))), (orderextrafeilds === null || orderextrafeilds === void 0 ? void 0 : orderextrafeilds.length) != 0 && /*#__PURE__*/React.createElement("div", {
11495
11553
  className: "col-lg-12 p-0 w-100 py-3"
11496
11554
  }, /*#__PURE__*/React.createElement("div", {
11497
- "class": "".concat(checkoutstyles.innersection) + ' w-100 mb-3 '
11555
+ "class": "".concat(checkoutstyles.innersection) + ' w-100 mb-3 py-3 '
11498
11556
  }, /*#__PURE__*/React.createElement("div", {
11499
11557
  className: "row m-0 w-100 mb-3 pl-3 pr-3"
11500
- }, /*#__PURE__*/React.createElement("div", {
11501
- className: "col-lg-4 col-md-12 mb-3"
11502
- }, /*#__PURE__*/React.createElement("label", {
11503
- className: "".concat(checkoutstyles.input_label_name) + ' d-flex align-items-start '
11504
- }, langdetect == 'en' ? 'Event Date' : 'تاريخ الايفنت'), /*#__PURE__*/React.createElement("input", {
11505
- type: 'date',
11506
- className: "".concat(formstyles.form_control, " ").concat(checkoutstyles.form_control)
11507
- // value={}
11508
- ,
11509
- onChange: function onChange(event) {
11510
- // cartinfoupdater('email', event.target.value);
11511
- },
11512
- style: {
11513
- boxShadow: 'none'
11558
+ }, orderextrafeilds === null || orderextrafeilds === void 0 ? void 0 : orderextrafeilds.map(function (item, index) {
11559
+ if (item.type == 'date') {
11560
+ return /*#__PURE__*/React.createElement("div", {
11561
+ className: "col-lg-4 col-md-12 mb-3"
11562
+ }, /*#__PURE__*/React.createElement("label", {
11563
+ className: "".concat(checkoutstyles.input_label_name) + ' d-flex align-items-start '
11564
+ }, langdetect == 'en' ? item.title_en : item.title_ar), /*#__PURE__*/React.createElement("input", {
11565
+ type: 'date',
11566
+ className: "".concat(formstyles.form_control, " ").concat(checkoutstyles.form_control),
11567
+ value: item.value,
11568
+ onChange: function onChange(event) {
11569
+ var temporderextrafeilds = _toConsumableArray(orderextrafeilds);
11570
+ temporderextrafeilds[index].value = event.target.value;
11571
+ setorderextrafeilds(_toConsumableArray(temporderextrafeilds));
11572
+ },
11573
+ style: {
11574
+ boxShadow: 'none'
11575
+ }
11576
+ }));
11577
+ }
11578
+ if (item.type == 'time') {
11579
+ return /*#__PURE__*/React.createElement("div", {
11580
+ className: "col-lg-4 col-md-12 mb-3"
11581
+ }, /*#__PURE__*/React.createElement("label", {
11582
+ className: "".concat(checkoutstyles.input_label_name) + ' d-flex align-items-start '
11583
+ }, langdetect == 'en' ? item.title_en : item.title_ar), /*#__PURE__*/React.createElement("input", {
11584
+ type: 'time',
11585
+ className: "".concat(formstyles.form_control, " ").concat(checkoutstyles.form_control),
11586
+ value: item.value,
11587
+ onChange: function onChange(event) {
11588
+ var temporderextrafeilds = _toConsumableArray(orderextrafeilds);
11589
+ temporderextrafeilds[index].value = event.target.value;
11590
+ setorderextrafeilds(_toConsumableArray(temporderextrafeilds));
11591
+ },
11592
+ style: {
11593
+ boxShadow: 'none'
11594
+ }
11595
+ }));
11514
11596
  }
11515
- }))))), sectionproperties.showpaymentfooter == 'Show' && /*#__PURE__*/React.createElement("div", {
11597
+ })))), sectionproperties.showpaymentfooter == 'Show' && /*#__PURE__*/React.createElement("div", {
11516
11598
  className: "col-lg-12 p-0 w-100"
11517
11599
  }, /*#__PURE__*/React.createElement("div", {
11518
11600
  "class": "".concat(checkoutstyles.innersection) + ' w-100 mb-3 '
@@ -11636,7 +11718,7 @@ var Checkout = function Checkout(props) {
11636
11718
  d: "M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"
11637
11719
  })), /*#__PURE__*/React.createElement("p", {
11638
11720
  className: "".concat(formstyles.checkbox_label) + ' ml-2 mb-0 wordbreak cursor-pointer mr-2 '
11639
- }, langdetect == 'en' ? sectionproperties.walletnameen : sectionproperties.walletnamear))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i5 = authdetailsContext.instinfo) === null || _authdetailsContext$i5 === void 0 ? void 0 : _authdetailsContext$i5.acceptForsaCard) == 1 && /*#__PURE__*/React.createElement("div", {
11721
+ }, langdetect == 'en' ? sectionproperties.walletnameen : sectionproperties.walletnamear))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i4 = authdetailsContext.instinfo) === null || _authdetailsContext$i4 === void 0 ? void 0 : _authdetailsContext$i4.acceptForsaCard) == 1 && /*#__PURE__*/React.createElement("div", {
11640
11722
  className: "col-xl-4 col-lg-4 col-md-12 mb-3"
11641
11723
  }, /*#__PURE__*/React.createElement("label", {
11642
11724
  className: langdetect == 'en' ? "".concat(formstyles.checkbox, " ").concat(checkoutstyles.checkbox, " ") + ' d-flex mb-0 ' : "".concat(formstyles.checkbox, " ").concat(formstyles.checkboxtranslated, " ").concat(checkoutstyles.checkbox, " ") + ' d-flex mb-0 '
@@ -11657,7 +11739,7 @@ var Checkout = function Checkout(props) {
11657
11739
  d: "M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"
11658
11740
  })), /*#__PURE__*/React.createElement("p", {
11659
11741
  className: "".concat(formstyles.checkbox_label) + ' ml-2 mb-0 wordbreak cursor-pointer mr-2 '
11660
- }, langdetect == 'en' ? 'Forsa' : ' Forsa'))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i6 = authdetailsContext.instinfo) === null || _authdetailsContext$i6 === void 0 ? void 0 : _authdetailsContext$i6.acceptonlinePaypal) == 1 && /*#__PURE__*/React.createElement("div", {
11742
+ }, langdetect == 'en' ? 'Forsa' : ' Forsa'))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i5 = authdetailsContext.instinfo) === null || _authdetailsContext$i5 === void 0 ? void 0 : _authdetailsContext$i5.acceptonlinePaypal) == 1 && /*#__PURE__*/React.createElement("div", {
11661
11743
  className: "col-xl-4 col-lg-4 col-md-12 mb-3"
11662
11744
  }, /*#__PURE__*/React.createElement("label", {
11663
11745
  className: langdetect == 'en' ? "".concat(formstyles.checkbox, " ").concat(checkoutstyles.checkbox, " ") + ' d-flex mb-0 ' : "".concat(formstyles.checkbox, " ").concat(formstyles.checkboxtranslated, " ").concat(checkoutstyles.checkbox, " ") + ' d-flex mb-0 '
@@ -11678,7 +11760,7 @@ var Checkout = function Checkout(props) {
11678
11760
  d: "M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"
11679
11761
  })), /*#__PURE__*/React.createElement("p", {
11680
11762
  className: "".concat(formstyles.checkbox_label, " + ' ml-2 mb-0 wordbreak cursor-pointer mr-2 '")
11681
- }, langdetect == 'en' ? 'Paypal' : ' Paypal'))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i7 = authdetailsContext.instinfo) === null || _authdetailsContext$i7 === void 0 ? void 0 : _authdetailsContext$i7.acceptBankInstallementsCard) == 1 && /*#__PURE__*/React.createElement("div", {
11763
+ }, langdetect == 'en' ? 'Paypal' : ' Paypal'))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i6 = authdetailsContext.instinfo) === null || _authdetailsContext$i6 === void 0 ? void 0 : _authdetailsContext$i6.acceptBankInstallementsCard) == 1 && /*#__PURE__*/React.createElement("div", {
11682
11764
  className: "col-xl-4 col-lg-4 col-md-12 mb-3"
11683
11765
  }, /*#__PURE__*/React.createElement("label", {
11684
11766
  className: langdetect == 'en' ? "".concat(formstyles.checkbox, " ").concat(checkoutstyles.checkbox, " ") + ' d-flex mb-0 ' : "".concat(formstyles.checkbox, " ").concat(formstyles.checkboxtranslated, " ").concat(checkoutstyles.checkbox, " ") + ' d-flex mb-0 '
@@ -11699,7 +11781,7 @@ var Checkout = function Checkout(props) {
11699
11781
  d: "M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"
11700
11782
  })), /*#__PURE__*/React.createElement("p", {
11701
11783
  className: "".concat(formstyles.checkbox_label) + ' ml-2 mb-0 wordbreak cursor-pointer mr-2 '
11702
- }, langdetect == 'en' ? 'Bank Installments' : ' التقسيط عن طريق البنك'))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i8 = authdetailsContext.instinfo) === null || _authdetailsContext$i8 === void 0 ? void 0 : _authdetailsContext$i8.acceptAmanCard) == 1 && /*#__PURE__*/React.createElement("div", {
11784
+ }, langdetect == 'en' ? 'Bank Installments' : ' التقسيط عن طريق البنك'))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i7 = authdetailsContext.instinfo) === null || _authdetailsContext$i7 === void 0 ? void 0 : _authdetailsContext$i7.acceptAmanCard) == 1 && /*#__PURE__*/React.createElement("div", {
11703
11785
  className: "col-xl-4 col-lg-4 col-md-12 mb-3"
11704
11786
  }, /*#__PURE__*/React.createElement("label", {
11705
11787
  className: langdetect == 'en' ? "".concat(formstyles.checkbox, " ").concat(checkoutstyles.checkbox, " ") + ' d-flex mb-0 ' : "".concat(formstyles.checkbox, " ").concat(formstyles.checkboxtranslated, " ").concat(checkoutstyles.checkbox, " ") + ' d-flex mb-0 '
@@ -30936,8 +31018,8 @@ var Simpleheader = function Simpleheader(props) {
30936
31018
  }, /*#__PURE__*/React.createElement("img", {
30937
31019
  src: 'https://tabex-co.com/storage/StaticImages/whatsapp.png',
30938
31020
  style: {
30939
- width: '40px',
30940
- height: '40px',
31021
+ width: sectionproperties.wabtnwidth + 'px',
31022
+ height: sectionproperties.wabtnsize + 'px',
30941
31023
  cursor: 'pointer'
30942
31024
  }
30943
31025
  }))), sectionproperties.showfooterphonenumber == 'Show' && /*#__PURE__*/React.createElement("a", {
@@ -60494,7 +60576,7 @@ var DynamicForm = function DynamicForm(props) {
60494
60576
  }))), /*#__PURE__*/React.createElement("div", {
60495
60577
  "class": "col-lg-12 d-flex align-items-cemter my-4",
60496
60578
  style: {
60497
- justifyContent: sectionproperties.generalbtn_position == 'Centered' ? 'center' : 'start'
60579
+ justifyContent: sectionproperties.generalbtn_position != 'Centered' ? 'start' : 'center'
60498
60580
  }
60499
60581
  }, /*#__PURE__*/React.createElement("button", {
60500
60582
  onClick: function onClick() {
@@ -63373,7 +63455,7 @@ var ServicesectionCenteredcards = function ServicesectionCenteredcards(props) {
63373
63455
  window.open(cardinfoitem.btnlink, '_blank');
63374
63456
  }
63375
63457
  }
63376
- }, sectionproperties.imageposition == 'Top' && /*#__PURE__*/React.createElement("div", {
63458
+ }, sectionproperties.imageposition == 'Top' && sectionproperties.image_width != 0 && /*#__PURE__*/React.createElement("div", {
63377
63459
  "class": "col-lg-12 d-flex align-items-center p-0 w-100 h-100",
63378
63460
  style: {
63379
63461
  marginBottom: sectionproperties.image_mb + 'px',
@@ -63448,7 +63530,7 @@ var ServicesectionCenteredcards = function ServicesectionCenteredcards(props) {
63448
63530
  textAlign: sectionproperties.justifyContentCenter == 'Centered' ? 'center' : '',
63449
63531
  color: cardinfoitem.text2colorfromarray
63450
63532
  }
63451
- }, langdetect == 'en' ? cardinfoitem.cardobj_descripen : cardinfoitem.cardobj_descripar)), sectionproperties.imageposition == 'Bottom' && /*#__PURE__*/React.createElement("div", {
63533
+ }, langdetect == 'en' ? cardinfoitem.cardobj_descripen : cardinfoitem.cardobj_descripar)), sectionproperties.imageposition == 'Bottom' && sectionproperties.image_width != 0 && /*#__PURE__*/React.createElement("div", {
63452
63534
  "class": "col-lg-12 d-flex align-items-center p-0",
63453
63535
  style: {
63454
63536
  marginTop: sectionproperties.image_mb + 'px',
package/dist/index.umd.js CHANGED
@@ -10152,7 +10152,7 @@
10152
10152
  return import('react-select');
10153
10153
  });
10154
10154
  var Checkout = function Checkout(props) {
10155
- var _css, _fetchcustomercartQue65, _fetchcustomercartQue66, _fetchcustomercartQue67, _fetchcustomercartQue72, _fetchcustomercartQue73, _fetchcustomercartQue74, _fetchcustomercartQue75, _authdetailsContext$i4, _fetchcustomercartQue76, _fetchcustomercartQue78, _fetchcustomercartQue80, _fetchcustomercartQue82, _fetchcustomercartQue84, _authdetailsContext$i5, _fetchcustomercartQue86, _authdetailsContext$i6, _fetchcustomercartQue88, _authdetailsContext$i7, _fetchcustomercartQue90, _authdetailsContext$i8, _fetchcustomercartQue92, _fetchcustomercartQue94;
10155
+ var _css, _fetchcustomercartQue65, _fetchcustomercartQue66, _fetchcustomercartQue67, _fetchcustomercartQue72, _fetchcustomercartQue73, _fetchcustomercartQue74, _fetchcustomercartQue75, _fetchcustomercartQue76, _fetchcustomercartQue78, _fetchcustomercartQue80, _fetchcustomercartQue82, _fetchcustomercartQue84, _authdetailsContext$i4, _fetchcustomercartQue86, _authdetailsContext$i5, _fetchcustomercartQue88, _authdetailsContext$i6, _fetchcustomercartQue90, _authdetailsContext$i7, _fetchcustomercartQue92, _fetchcustomercartQue94;
10156
10156
  var _useState = React.useState(null),
10157
10157
  _useState2 = _slicedToArray__default["default"](_useState, 2);
10158
10158
  _useState2[0];
@@ -10203,7 +10203,10 @@
10203
10203
  _useState14 = _slicedToArray__default["default"](_useState13, 2),
10204
10204
  shippingmethods = _useState14[0],
10205
10205
  setshippingmethods = _useState14[1];
10206
- // const [orderextrafeilds, setorderextrafeilds] = useState([]);
10206
+ var _useState15 = React.useState([]),
10207
+ _useState16 = _slicedToArray__default["default"](_useState15, 2),
10208
+ orderextrafeilds = _useState16[0],
10209
+ setorderextrafeilds = _useState16[1];
10207
10210
  React.useEffect(function () {
10208
10211
  var _templatepropcontext$;
10209
10212
  var cartindex = templatepropcontext === null || templatepropcontext === void 0 || (_templatepropcontext$ = templatepropcontext.pagesnprop) === null || _templatepropcontext$ === void 0 ? void 0 : _templatepropcontext$.findIndex(function (x) {
@@ -10268,15 +10271,49 @@
10268
10271
  Pixel_EventsContext('InitiateCheckout', {});
10269
10272
  GeneralAPIMutationContext.mutate({
10270
10273
  endpointurl: '/InitiateCheckout',
10271
- mutateSuccesscallback: function mutateSuccesscallback() {}
10274
+ mutateSuccesscallback: function mutateSuccesscallback(data) {
10275
+ var _data$data;
10276
+ setUsedOrderExtraFieldsValues(data === null || data === void 0 || (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.order_extra_fields);
10277
+ }
10272
10278
  });
10273
10279
  }, [authdetailsContext]);
10280
+ var setUsedOrderExtraFieldsValues = function setUsedOrderExtraFieldsValues(order_extra_fields) {
10281
+ var usedOrderExtraFields = [];
10282
+ if (fetchcustomercartQueryContext.isSuccess && fetchcustomercartQueryContext != undefined && fetchcustomercartQueryContext.data != undefined && fetchcustomercartQueryContext.data.data != undefined && fetchcustomercartQueryContext.data.data.customercart != undefined && fetchcustomercartQueryContext.data.data.customercart.orderExtraFields != undefined && fetchcustomercartQueryContext.data.data.customercart.orderExtraFields != null && fetchcustomercartQueryContext.data.data.customercart.orderExtraFields != '') {
10283
+ var extraFieldsJson = fetchcustomercartQueryContext.data.data.customercart.orderExtraFields;
10284
+ try {
10285
+ // Check if extraFieldsJson is a valid JSON string
10286
+
10287
+ usedOrderExtraFields = JSON.parse(extraFieldsJson);
10288
+ } catch (error) {
10289
+ // In case of an error, log it and return an empty string
10290
+ console.error('Failed to parse JSON:', error);
10291
+ usedOrderExtraFields = [];
10292
+ }
10293
+ }
10294
+ var temporderExtraFields = _toConsumableArray__default["default"](order_extra_fields);
10295
+ temporderExtraFields === null || temporderExtraFields === void 0 || temporderExtraFields.forEach(function (item, index) {
10296
+ var _usedOrderExtraFields;
10297
+ var singleusedvalue = '';
10298
+ (_usedOrderExtraFields = usedOrderExtraFields) === null || _usedOrderExtraFields === void 0 || _usedOrderExtraFields.forEach(function (useditem) {
10299
+ if (useditem.id == item.id) {
10300
+ singleusedvalue = useditem.value;
10301
+ }
10302
+ });
10303
+ item.value = singleusedvalue;
10304
+ });
10305
+ setorderextrafeilds(_toConsumableArray__default["default"](temporderExtraFields));
10306
+ };
10274
10307
  React.useEffect(function () {
10275
10308
  if (fetchcustomercartQueryContext != undefined && fetchcustomercartQueryContext.data != undefined && fetchcustomercartQueryContext.data.data != undefined && fetchcustomercartQueryContext.data.data.customercart != undefined && fetchcustomercartQueryContext.data.data.customercart.cityid != undefined && fetchcustomercartQueryContext.data.data.customercart.cityid != null && fetchcustomercartQueryContext.data.data.customercart.cityid != '' && fetchcustomercartQueryContext.data.data.customercart.length != 0) {
10276
10309
  var _fetchcustomercartQue9;
10277
10310
  var cityid = fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue9 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue9 === void 0 || (_fetchcustomercartQue9 = _fetchcustomercartQue9.data) === null || _fetchcustomercartQue9 === void 0 ? void 0 : _fetchcustomercartQue9.customercart.cityid;
10278
10311
  fetchshippingmethods(cityid);
10279
10312
  }
10313
+ if (fetchcustomercartQueryContext.isSuccess) {
10314
+ setUsedOrderExtraFieldsValues(orderextrafeilds);
10315
+ }
10316
+
10280
10317
  // fetchorderextrafields();
10281
10318
  }, [fetchcustomercartQueryContext.data]);
10282
10319
  var fetchshippingmethods = function fetchshippingmethods(cityid) {
@@ -10303,6 +10340,7 @@
10303
10340
  // };
10304
10341
  var cartinfoupdater = function cartinfoupdater(key, value) {
10305
10342
  var _fetchcustomercartQue10, _fetchcustomercartQue11, _fetchcustomercartQue12, _fetchcustomercartQue13, _fetchcustomercartQue14, _fetchcustomercartQue15, _fetchcustomercartQue16, _fetchcustomercartQue17, _fetchcustomercartQue18, _fetchcustomercartQue19, _fetchcustomercartQue20;
10343
+ var OrderExtraFieldsToBeSentArr = returnOrderExtraFieldsArrayTobeSnetarr();
10306
10344
  var cartarr = queryClient.getQueryData('fetchcustomercart_API');
10307
10345
  cartarr.data.customercart[key] = value;
10308
10346
  queryClient.setQueryData('fetchcustomercart_API', cartarr);
@@ -10317,7 +10355,8 @@
10317
10355
  mobile: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue17 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue17 === void 0 || (_fetchcustomercartQue17 = _fetchcustomercartQue17.data) === null || _fetchcustomercartQue17 === void 0 ? void 0 : _fetchcustomercartQue17.customercart.mobile,
10318
10356
  notes: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue18 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue18 === void 0 || (_fetchcustomercartQue18 = _fetchcustomercartQue18.data) === null || _fetchcustomercartQue18 === void 0 ? void 0 : _fetchcustomercartQue18.customercart.notes,
10319
10357
  aff_code: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue19 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue19 === void 0 || (_fetchcustomercartQue19 = _fetchcustomercartQue19.data) === null || _fetchcustomercartQue19 === void 0 ? void 0 : _fetchcustomercartQue19.customercart.aff_code,
10320
- shippingmethod_id: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue20 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue20 === void 0 || (_fetchcustomercartQue20 = _fetchcustomercartQue20.data) === null || _fetchcustomercartQue20 === void 0 ? void 0 : _fetchcustomercartQue20.customercart.shippingmethod_id
10358
+ shippingmethod_id: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue20 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue20 === void 0 || (_fetchcustomercartQue20 = _fetchcustomercartQue20.data) === null || _fetchcustomercartQue20 === void 0 ? void 0 : _fetchcustomercartQue20.customercart.shippingmethod_id,
10359
+ orderextrafeilds: JSON.stringify(OrderExtraFieldsToBeSentArr)
10321
10360
  };
10322
10361
  if (key == 'address' || key == 'name' || key == 'mobile' || key == 'email' || key == 'notes' || key == 'aff_code') ; else {
10323
10362
  var _fetchcustomercartQue21;
@@ -10516,15 +10555,33 @@
10516
10555
  marginTop: sectionproperties.marginTopResp + 'px'
10517
10556
  }
10518
10557
  }));
10558
+ var returnOrderExtraFieldsArrayTobeSnetarr = function returnOrderExtraFieldsArrayTobeSnetarr() {
10559
+ var OrderExtraFieldsToBeSentArr = [];
10560
+ var temporderextrafeilds = _toConsumableArray__default["default"](orderextrafeilds);
10561
+ temporderextrafeilds === null || temporderextrafeilds === void 0 || temporderextrafeilds.forEach(function (item, index) {
10562
+ if (item.value != undefined && item != null && item.length != 0) {
10563
+ var obj = {
10564
+ id: item.id,
10565
+ title_en: item.title_en,
10566
+ title_ar: item.title_ar,
10567
+ value: item.value
10568
+ };
10569
+ OrderExtraFieldsToBeSentArr.push(obj);
10570
+ }
10571
+ });
10572
+ return OrderExtraFieldsToBeSentArr;
10573
+ };
10519
10574
  var addorderfuncrunner = /*#__PURE__*/function () {
10520
10575
  var _ref = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee() {
10521
10576
  var _fetchcustomercartQue22, _fetchcustomercartQue23, _fetchcustomercartQue24, _fetchcustomercartQue25, _fetchcustomercartQue26, _fetchcustomercartQue27, _fetchcustomercartQue28, _fetchcustomercartQue29, _fetchcustomercartQue30, _fetchcustomercartQue31, _fetchcustomercartQue32;
10577
+ var OrderExtraFieldsToBeSentArr;
10522
10578
  return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
10523
10579
  while (1) switch (_context.prev = _context.next) {
10524
10580
  case 0:
10525
10581
  // var temppayload = fetchcustomercartQueryContext?.data?.data?.customercart;
10526
10582
  // ChooseState_CountryMutationContext.mutate(payloadobj);
10527
10583
  // temppayload.endpointurl = '/ChooseState_Country';
10584
+ OrderExtraFieldsToBeSentArr = returnOrderExtraFieldsArrayTobeSnetarr();
10528
10585
  GeneralAPIMutationContext.mutate({
10529
10586
  endpointurl: '/ChooseState_Country',
10530
10587
  stateid: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue22 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue22 === void 0 || (_fetchcustomercartQue22 = _fetchcustomercartQue22.data) === null || _fetchcustomercartQue22 === void 0 ? void 0 : _fetchcustomercartQue22.customercart.stateid,
@@ -10538,6 +10595,7 @@
10538
10595
  notes: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue30 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue30 === void 0 || (_fetchcustomercartQue30 = _fetchcustomercartQue30.data) === null || _fetchcustomercartQue30 === void 0 ? void 0 : _fetchcustomercartQue30.customercart.notes,
10539
10596
  aff_code: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue31 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue31 === void 0 || (_fetchcustomercartQue31 = _fetchcustomercartQue31.data) === null || _fetchcustomercartQue31 === void 0 ? void 0 : _fetchcustomercartQue31.customercart.aff_code,
10540
10597
  shippingmethod_id: fetchcustomercartQueryContext === null || fetchcustomercartQueryContext === void 0 || (_fetchcustomercartQue32 = fetchcustomercartQueryContext.data) === null || _fetchcustomercartQue32 === void 0 || (_fetchcustomercartQue32 = _fetchcustomercartQue32.data) === null || _fetchcustomercartQue32 === void 0 ? void 0 : _fetchcustomercartQue32.customercart.shippingmethod_id,
10598
+ orderextrafeilds: JSON.stringify(OrderExtraFieldsToBeSentArr),
10541
10599
  mutateSuccesscallback: function mutateSuccesscallback(data, variables) {
10542
10600
  if (data.data.status) {
10543
10601
  var _fetchcustomercartQue33, _fetchcustomercartQue34;
@@ -10561,7 +10619,7 @@
10561
10619
  }
10562
10620
  }
10563
10621
  });
10564
- case 1:
10622
+ case 2:
10565
10623
  case "end":
10566
10624
  return _context.stop();
10567
10625
  }
@@ -11364,28 +11422,52 @@
11364
11422
  return /*#__PURE__*/React__default["default"].createElement("option", {
11365
11423
  value: item.id
11366
11424
  }, langdetect == 'en' ? item.name_en : item.name_ar);
11367
- }))))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i4 = authdetailsContext.instinfo) === null || _authdetailsContext$i4 === void 0 ? void 0 : _authdetailsContext$i4.contactinfo.instid) == '66b4a0338cb14' && /*#__PURE__*/React__default["default"].createElement("div", {
11425
+ }))))), (orderextrafeilds === null || orderextrafeilds === void 0 ? void 0 : orderextrafeilds.length) != 0 && /*#__PURE__*/React__default["default"].createElement("div", {
11368
11426
  className: "col-lg-12 p-0 w-100 py-3"
11369
11427
  }, /*#__PURE__*/React__default["default"].createElement("div", {
11370
- "class": "".concat(checkoutstyles.innersection) + ' w-100 mb-3 '
11428
+ "class": "".concat(checkoutstyles.innersection) + ' w-100 mb-3 py-3 '
11371
11429
  }, /*#__PURE__*/React__default["default"].createElement("div", {
11372
11430
  className: "row m-0 w-100 mb-3 pl-3 pr-3"
11373
- }, /*#__PURE__*/React__default["default"].createElement("div", {
11374
- className: "col-lg-4 col-md-12 mb-3"
11375
- }, /*#__PURE__*/React__default["default"].createElement("label", {
11376
- className: "".concat(checkoutstyles.input_label_name) + ' d-flex align-items-start '
11377
- }, langdetect == 'en' ? 'Event Date' : 'تاريخ الايفنت'), /*#__PURE__*/React__default["default"].createElement("input", {
11378
- type: 'date',
11379
- className: "".concat(formstyles.form_control, " ").concat(checkoutstyles.form_control)
11380
- // value={}
11381
- ,
11382
- onChange: function onChange(event) {
11383
- // cartinfoupdater('email', event.target.value);
11384
- },
11385
- style: {
11386
- boxShadow: 'none'
11431
+ }, orderextrafeilds === null || orderextrafeilds === void 0 ? void 0 : orderextrafeilds.map(function (item, index) {
11432
+ if (item.type == 'date') {
11433
+ return /*#__PURE__*/React__default["default"].createElement("div", {
11434
+ className: "col-lg-4 col-md-12 mb-3"
11435
+ }, /*#__PURE__*/React__default["default"].createElement("label", {
11436
+ className: "".concat(checkoutstyles.input_label_name) + ' d-flex align-items-start '
11437
+ }, langdetect == 'en' ? item.title_en : item.title_ar), /*#__PURE__*/React__default["default"].createElement("input", {
11438
+ type: 'date',
11439
+ className: "".concat(formstyles.form_control, " ").concat(checkoutstyles.form_control),
11440
+ value: item.value,
11441
+ onChange: function onChange(event) {
11442
+ var temporderextrafeilds = _toConsumableArray__default["default"](orderextrafeilds);
11443
+ temporderextrafeilds[index].value = event.target.value;
11444
+ setorderextrafeilds(_toConsumableArray__default["default"](temporderextrafeilds));
11445
+ },
11446
+ style: {
11447
+ boxShadow: 'none'
11448
+ }
11449
+ }));
11450
+ }
11451
+ if (item.type == 'time') {
11452
+ return /*#__PURE__*/React__default["default"].createElement("div", {
11453
+ className: "col-lg-4 col-md-12 mb-3"
11454
+ }, /*#__PURE__*/React__default["default"].createElement("label", {
11455
+ className: "".concat(checkoutstyles.input_label_name) + ' d-flex align-items-start '
11456
+ }, langdetect == 'en' ? item.title_en : item.title_ar), /*#__PURE__*/React__default["default"].createElement("input", {
11457
+ type: 'time',
11458
+ className: "".concat(formstyles.form_control, " ").concat(checkoutstyles.form_control),
11459
+ value: item.value,
11460
+ onChange: function onChange(event) {
11461
+ var temporderextrafeilds = _toConsumableArray__default["default"](orderextrafeilds);
11462
+ temporderextrafeilds[index].value = event.target.value;
11463
+ setorderextrafeilds(_toConsumableArray__default["default"](temporderextrafeilds));
11464
+ },
11465
+ style: {
11466
+ boxShadow: 'none'
11467
+ }
11468
+ }));
11387
11469
  }
11388
- }))))), sectionproperties.showpaymentfooter == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
11470
+ })))), sectionproperties.showpaymentfooter == 'Show' && /*#__PURE__*/React__default["default"].createElement("div", {
11389
11471
  className: "col-lg-12 p-0 w-100"
11390
11472
  }, /*#__PURE__*/React__default["default"].createElement("div", {
11391
11473
  "class": "".concat(checkoutstyles.innersection) + ' w-100 mb-3 '
@@ -11509,7 +11591,7 @@
11509
11591
  d: "M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"
11510
11592
  })), /*#__PURE__*/React__default["default"].createElement("p", {
11511
11593
  className: "".concat(formstyles.checkbox_label) + ' ml-2 mb-0 wordbreak cursor-pointer mr-2 '
11512
- }, langdetect == 'en' ? sectionproperties.walletnameen : sectionproperties.walletnamear))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i5 = authdetailsContext.instinfo) === null || _authdetailsContext$i5 === void 0 ? void 0 : _authdetailsContext$i5.acceptForsaCard) == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
11594
+ }, langdetect == 'en' ? sectionproperties.walletnameen : sectionproperties.walletnamear))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i4 = authdetailsContext.instinfo) === null || _authdetailsContext$i4 === void 0 ? void 0 : _authdetailsContext$i4.acceptForsaCard) == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
11513
11595
  className: "col-xl-4 col-lg-4 col-md-12 mb-3"
11514
11596
  }, /*#__PURE__*/React__default["default"].createElement("label", {
11515
11597
  className: langdetect == 'en' ? "".concat(formstyles.checkbox, " ").concat(checkoutstyles.checkbox, " ") + ' d-flex mb-0 ' : "".concat(formstyles.checkbox, " ").concat(formstyles.checkboxtranslated, " ").concat(checkoutstyles.checkbox, " ") + ' d-flex mb-0 '
@@ -11530,7 +11612,7 @@
11530
11612
  d: "M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"
11531
11613
  })), /*#__PURE__*/React__default["default"].createElement("p", {
11532
11614
  className: "".concat(formstyles.checkbox_label) + ' ml-2 mb-0 wordbreak cursor-pointer mr-2 '
11533
- }, langdetect == 'en' ? 'Forsa' : ' Forsa'))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i6 = authdetailsContext.instinfo) === null || _authdetailsContext$i6 === void 0 ? void 0 : _authdetailsContext$i6.acceptonlinePaypal) == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
11615
+ }, langdetect == 'en' ? 'Forsa' : ' Forsa'))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i5 = authdetailsContext.instinfo) === null || _authdetailsContext$i5 === void 0 ? void 0 : _authdetailsContext$i5.acceptonlinePaypal) == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
11534
11616
  className: "col-xl-4 col-lg-4 col-md-12 mb-3"
11535
11617
  }, /*#__PURE__*/React__default["default"].createElement("label", {
11536
11618
  className: langdetect == 'en' ? "".concat(formstyles.checkbox, " ").concat(checkoutstyles.checkbox, " ") + ' d-flex mb-0 ' : "".concat(formstyles.checkbox, " ").concat(formstyles.checkboxtranslated, " ").concat(checkoutstyles.checkbox, " ") + ' d-flex mb-0 '
@@ -11551,7 +11633,7 @@
11551
11633
  d: "M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"
11552
11634
  })), /*#__PURE__*/React__default["default"].createElement("p", {
11553
11635
  className: "".concat(formstyles.checkbox_label, " + ' ml-2 mb-0 wordbreak cursor-pointer mr-2 '")
11554
- }, langdetect == 'en' ? 'Paypal' : ' Paypal'))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i7 = authdetailsContext.instinfo) === null || _authdetailsContext$i7 === void 0 ? void 0 : _authdetailsContext$i7.acceptBankInstallementsCard) == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
11636
+ }, langdetect == 'en' ? 'Paypal' : ' Paypal'))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i6 = authdetailsContext.instinfo) === null || _authdetailsContext$i6 === void 0 ? void 0 : _authdetailsContext$i6.acceptBankInstallementsCard) == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
11555
11637
  className: "col-xl-4 col-lg-4 col-md-12 mb-3"
11556
11638
  }, /*#__PURE__*/React__default["default"].createElement("label", {
11557
11639
  className: langdetect == 'en' ? "".concat(formstyles.checkbox, " ").concat(checkoutstyles.checkbox, " ") + ' d-flex mb-0 ' : "".concat(formstyles.checkbox, " ").concat(formstyles.checkboxtranslated, " ").concat(checkoutstyles.checkbox, " ") + ' d-flex mb-0 '
@@ -11572,7 +11654,7 @@
11572
11654
  d: "M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"
11573
11655
  })), /*#__PURE__*/React__default["default"].createElement("p", {
11574
11656
  className: "".concat(formstyles.checkbox_label) + ' ml-2 mb-0 wordbreak cursor-pointer mr-2 '
11575
- }, langdetect == 'en' ? 'Bank Installments' : ' التقسيط عن طريق البنك'))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i8 = authdetailsContext.instinfo) === null || _authdetailsContext$i8 === void 0 ? void 0 : _authdetailsContext$i8.acceptAmanCard) == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
11657
+ }, langdetect == 'en' ? 'Bank Installments' : ' التقسيط عن طريق البنك'))), (authdetailsContext === null || authdetailsContext === void 0 || (_authdetailsContext$i7 = authdetailsContext.instinfo) === null || _authdetailsContext$i7 === void 0 ? void 0 : _authdetailsContext$i7.acceptAmanCard) == 1 && /*#__PURE__*/React__default["default"].createElement("div", {
11576
11658
  className: "col-xl-4 col-lg-4 col-md-12 mb-3"
11577
11659
  }, /*#__PURE__*/React__default["default"].createElement("label", {
11578
11660
  className: langdetect == 'en' ? "".concat(formstyles.checkbox, " ").concat(checkoutstyles.checkbox, " ") + ' d-flex mb-0 ' : "".concat(formstyles.checkbox, " ").concat(formstyles.checkboxtranslated, " ").concat(checkoutstyles.checkbox, " ") + ' d-flex mb-0 '
@@ -30809,8 +30891,8 @@
30809
30891
  }, /*#__PURE__*/React__default["default"].createElement("img", {
30810
30892
  src: 'https://tabex-co.com/storage/StaticImages/whatsapp.png',
30811
30893
  style: {
30812
- width: '40px',
30813
- height: '40px',
30894
+ width: sectionproperties.wabtnwidth + 'px',
30895
+ height: sectionproperties.wabtnsize + 'px',
30814
30896
  cursor: 'pointer'
30815
30897
  }
30816
30898
  }))), sectionproperties.showfooterphonenumber == 'Show' && /*#__PURE__*/React__default["default"].createElement("a", {
@@ -60367,7 +60449,7 @@
60367
60449
  }))), /*#__PURE__*/React__default["default"].createElement("div", {
60368
60450
  "class": "col-lg-12 d-flex align-items-cemter my-4",
60369
60451
  style: {
60370
- justifyContent: sectionproperties.generalbtn_position == 'Centered' ? 'center' : 'start'
60452
+ justifyContent: sectionproperties.generalbtn_position != 'Centered' ? 'start' : 'center'
60371
60453
  }
60372
60454
  }, /*#__PURE__*/React__default["default"].createElement("button", {
60373
60455
  onClick: function onClick() {
@@ -63246,7 +63328,7 @@
63246
63328
  window.open(cardinfoitem.btnlink, '_blank');
63247
63329
  }
63248
63330
  }
63249
- }, sectionproperties.imageposition == 'Top' && /*#__PURE__*/React__default["default"].createElement("div", {
63331
+ }, sectionproperties.imageposition == 'Top' && sectionproperties.image_width != 0 && /*#__PURE__*/React__default["default"].createElement("div", {
63250
63332
  "class": "col-lg-12 d-flex align-items-center p-0 w-100 h-100",
63251
63333
  style: {
63252
63334
  marginBottom: sectionproperties.image_mb + 'px',
@@ -63321,7 +63403,7 @@
63321
63403
  textAlign: sectionproperties.justifyContentCenter == 'Centered' ? 'center' : '',
63322
63404
  color: cardinfoitem.text2colorfromarray
63323
63405
  }
63324
- }, langdetect == 'en' ? cardinfoitem.cardobj_descripen : cardinfoitem.cardobj_descripar)), sectionproperties.imageposition == 'Bottom' && /*#__PURE__*/React__default["default"].createElement("div", {
63406
+ }, langdetect == 'en' ? cardinfoitem.cardobj_descripen : cardinfoitem.cardobj_descripar)), sectionproperties.imageposition == 'Bottom' && sectionproperties.image_width != 0 && /*#__PURE__*/React__default["default"].createElement("div", {
63325
63407
  "class": "col-lg-12 d-flex align-items-center p-0",
63326
63408
  style: {
63327
63409
  marginTop: sectionproperties.image_mb + 'px',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tabexseriescomponents",
3
- "version": "0.0.724",
3
+ "version": "0.0.726",
4
4
  "description": "your description",
5
5
  "main": "dist/index.cjs.js",
6
6
  "scripts": {