s-platform-landing-section 0.1.11 → 0.1.12

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.
@@ -762,15 +762,15 @@ var Input = forwardRef(function (props, ref) {
762
762
  for (var _iterator = _createForOfIteratorHelperLoose(rules), _step; !(_step = _iterator()).done;) {
763
763
  var _e$pattern, _e$validate;
764
764
  var e = _step.value;
765
- if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && value === '') {
765
+ if ((e === null || e === void 0 ? void 0 : e.type) === 'required' && (value === '' || value === null)) {
766
766
  _setError(e === null || e === void 0 ? void 0 : e.message);
767
767
  count++;
768
768
  break;
769
- } else if ((e === null || e === void 0 ? void 0 : e.type) === 'pattern' && !(e !== null && e !== void 0 && (_e$pattern = e.pattern) !== null && _e$pattern !== void 0 && _e$pattern.test(value))) {
769
+ } else if (value !== "" && (e === null || e === void 0 ? void 0 : e.type) === 'pattern' && !(e !== null && e !== void 0 && (_e$pattern = e.pattern) !== null && _e$pattern !== void 0 && _e$pattern.test(value))) {
770
770
  _setError(e === null || e === void 0 ? void 0 : e.message);
771
771
  count++;
772
772
  break;
773
- } else if ((e === null || e === void 0 ? void 0 : e.type) === "validate" && e !== null && e !== void 0 && e.validate && !(e !== null && e !== void 0 && (_e$validate = e.validate) !== null && _e$validate !== void 0 && _e$validate.call(e))) {
773
+ } else if (value !== "" && (e === null || e === void 0 ? void 0 : e.type) === "validate" && e !== null && e !== void 0 && e.validate && !(e !== null && e !== void 0 && (_e$validate = e.validate) !== null && _e$validate !== void 0 && _e$validate.call(e))) {
774
774
  _setError(e === null || e === void 0 ? void 0 : e.message);
775
775
  count++;
776
776
  break;
@@ -8162,7 +8162,7 @@ var InputPhoneNumber = forwardRef(function (props, ref) {
8162
8162
  _setError(e === null || e === void 0 ? void 0 : e.message);
8163
8163
  count++;
8164
8164
  break;
8165
- } else if ((e === null || e === void 0 ? void 0 : e.type) === 'pattern' && !(e !== null && e !== void 0 && (_e$pattern = e.pattern) !== null && _e$pattern !== void 0 && _e$pattern.test(value))) {
8165
+ } else if (value !== "" && (e === null || e === void 0 ? void 0 : e.type) === 'pattern' && !(e !== null && e !== void 0 && (_e$pattern = e.pattern) !== null && _e$pattern !== void 0 && _e$pattern.test(value))) {
8166
8166
  _setError(e === null || e === void 0 ? void 0 : e.message);
8167
8167
  count++;
8168
8168
  break;
@@ -8187,9 +8187,9 @@ var InputPhoneNumber = forwardRef(function (props, ref) {
8187
8187
  }, label ? /*#__PURE__*/React__default.createElement("label", {
8188
8188
  className: "mb-1 " + labelClassName
8189
8189
  }, label, labelRequired) : null, /*#__PURE__*/React__default.createElement("div", {
8190
- className: "flex items-center h-10 rounded-lg border " + className
8190
+ className: "flex items-center h-10 rounded-lg border border-stroke " + className
8191
8191
  }, /*#__PURE__*/React__default.createElement("button", {
8192
- className: "border-r-2 "
8192
+ className: "border-stroke border-r-2 "
8193
8193
  }, /*#__PURE__*/React__default.createElement(Select$1, {
8194
8194
  className: 'w-max border-0 !rounded-none !rounded-l-lg',
8195
8195
  defaultValue: countryCode,
@@ -9415,6 +9415,7 @@ var ProductItem2 = function ProductItem2(props) {
9415
9415
  Link = _props$Link === void 0 ? null : _props$Link,
9416
9416
  _props$className = props.className,
9417
9417
  className = _props$className === void 0 ? "" : _props$className;
9418
+ console.log("checkkkkkkkk:::::::", className);
9418
9419
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
9419
9420
  Link: Link,
9420
9421
  href: getLinkProductDetail(product)
@@ -9441,12 +9442,12 @@ var ProductItem3 = function ProductItem3(props) {
9441
9442
  Link: Link,
9442
9443
  href: getLinkProductDetail(product)
9443
9444
  }, /*#__PURE__*/React__default.createElement("div", {
9444
- className: "w-full border rounded-2xl " + className
9445
+ className: "w-full border border-stroke rounded-2xl " + className
9445
9446
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
9446
9447
  product: product,
9447
9448
  className: "w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-t-2xl"
9448
9449
  }), /*#__PURE__*/React__default.createElement("div", {
9449
- className: "p-4 flex flex-col gap-4 justify-start"
9450
+ className: "p-4 flex flex-col gap-4 items-start"
9450
9451
  }, /*#__PURE__*/React__default.createElement("div", {
9451
9452
  className: "line-clamp-1"
9452
9453
  }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -9467,15 +9468,15 @@ var ProductItem4 = function ProductItem4(props) {
9467
9468
  Link: Link,
9468
9469
  href: getLinkProductDetail(product)
9469
9470
  }, /*#__PURE__*/React__default.createElement("div", {
9470
- className: "w-full border flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
9471
+ className: "w-full border border-stroke flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
9471
9472
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
9472
9473
  product: product,
9473
9474
  className: "w-full h-44 sm:h-56 xl:h-72 bg-cover bg-no-repeat rounded-2xl"
9474
9475
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
9475
- className: "line-clamp-1"
9476
+ className: "text-start line-clamp-1"
9476
9477
  }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
9477
9478
  product: product,
9478
- className: "text-lg text-start"
9479
+ className: "text-lg text-start mt-2"
9479
9480
  })), /*#__PURE__*/React__default.createElement("div", {
9480
9481
  className: "flex pt-4 gap-2 md:gap-4 border-t items-center"
9481
9482
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -9506,7 +9507,7 @@ var ProductItem5 = function ProductItem5(props) {
9506
9507
  product: product,
9507
9508
  className: "w-full w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-2xl"
9508
9509
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
9509
- className: "line-clamp-1 mb-2"
9510
+ className: "text-start line-clamp-1 mb-2"
9510
9511
  }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
9511
9512
  product: product,
9512
9513
  className: "text-lg text-start"
@@ -9533,12 +9534,12 @@ var ProductItem6 = function ProductItem6(props) {
9533
9534
  Link: Link,
9534
9535
  href: getLinkProductDetail(product)
9535
9536
  }, /*#__PURE__*/React__default.createElement("div", {
9536
- className: "w-full border flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
9537
+ className: "w-full border border-stroke flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
9537
9538
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
9538
9539
  product: product,
9539
9540
  className: "w-full h-44 sm:h-56 xl:h-72 bg-cover bg-no-repeat rounded-2xl"
9540
9541
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
9541
- className: "line-clamp-1"
9542
+ className: "text start line-clamp-1"
9542
9543
  }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
9543
9544
  product: product,
9544
9545
  className: "text-lg text-start"
@@ -9553,6 +9554,32 @@ var ProductItem6 = function ProductItem6(props) {
9553
9554
  }))));
9554
9555
  };
9555
9556
 
9557
+ var ProductItem7 = function ProductItem7(props) {
9558
+ var product = props.product,
9559
+ _props$Link = props.Link,
9560
+ Link = _props$Link === void 0 ? null : _props$Link,
9561
+ _props$className = props.className,
9562
+ className = _props$className === void 0 ? "" : _props$className;
9563
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
9564
+ Link: Link,
9565
+ href: getLinkProductDetail(product)
9566
+ }, /*#__PURE__*/React__default.createElement("div", {
9567
+ className: "w-full bg-bgSecondary relative rounded-2xl " + className
9568
+ }, /*#__PURE__*/React__default.createElement(ProductImage, {
9569
+ product: product,
9570
+ className: "w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-t-2xl"
9571
+ }), /*#__PURE__*/React__default.createElement("div", {
9572
+ className: "p-4 flex flex-col gap-4 items-start"
9573
+ }, /*#__PURE__*/React__default.createElement("div", {
9574
+ className: "line-clamp-1"
9575
+ }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
9576
+ product: product,
9577
+ className: "text-lg text-start"
9578
+ })), product !== null && product !== void 0 && product.priceBeforeDiscount && (product === null || product === void 0 ? void 0 : product.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : product.price) ? /*#__PURE__*/React__default.createElement("div", {
9579
+ className: "absolute top-5 left-0 font-semibold px-3 py-1 bg-danger text-textButton rounded-r-2xl shadow-lg v-max"
9580
+ }, 1 - 100 * (product === null || product === void 0 ? void 0 : product.price) / (product === null || product === void 0 ? void 0 : product.priceBeforeDiscount)) : null));
9581
+ };
9582
+
9556
9583
  var TreatmentItem1 = function TreatmentItem1(props) {
9557
9584
  var product = props.product,
9558
9585
  _props$Link = props.Link,
@@ -9734,13 +9761,12 @@ var Products2 = function Products2(props) {
9734
9761
  primaryColor: primary,
9735
9762
  renderItem: function renderItem(item, index) {
9736
9763
  return /*#__PURE__*/React__default.createElement("div", {
9737
- key: "carousel-" + index,
9738
- className: "flex-shrink-0 w-[calc(50%-2px)] md:w-[calc(34%-16px)] lg:w-[calc(25%-12px)] xl:w-[calc(25%-19px)]"
9764
+ className: "border-0 flex-shrink-0 w-[calc(50%-2px)] md:w-[calc(34%-16px)] lg:w-[calc(25%-12px)] xl:w-[calc(25%-19px)]"
9739
9765
  }, /*#__PURE__*/React__default.createElement(ProductItem, {
9740
9766
  product: item.productInfo,
9767
+ key: "carousel-" + index,
9741
9768
  Link: Link,
9742
- shopConfigStyle: shopConfigStyle,
9743
- className: "border-0 bg-bgSecondary"
9769
+ shopConfigStyle: shopConfigStyle
9744
9770
  }));
9745
9771
  }
9746
9772
  })));
@@ -10278,7 +10304,7 @@ var ProductsTop1 = function ProductsTop1(props) {
10278
10304
  }, products === null || products === void 0 ? void 0 : products.map(function (product, idx) {
10279
10305
  return /*#__PURE__*/React__default.createElement(ProductItem, {
10280
10306
  Link: Link,
10281
- className: "bg-bgSecondary border-0",
10307
+ className: "border-0",
10282
10308
  shopConfigStyle: shopConfigStyle,
10283
10309
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10284
10310
  key: "htrhr-" + idx
@@ -10399,7 +10425,9 @@ var ProductHighlight1 = function ProductHighlight1(props) {
10399
10425
  var ProductDetail10 = function ProductDetail10(props) {
10400
10426
  var _product$images;
10401
10427
  var shopConfigStyle = props.shopConfigStyle,
10402
- shopConfig = props.shopConfig;
10428
+ shopConfig = props.shopConfig,
10429
+ _props$handleRedirect = props.handleRedirect,
10430
+ handleRedirect = _props$handleRedirect === void 0 ? function () {} : _props$handleRedirect;
10403
10431
  var _ProductDetailControl = ProductDetailController(props),
10404
10432
  product = _ProductDetailControl.product;
10405
10433
  var _useState = useState(),
@@ -10488,7 +10516,22 @@ var ProductDetail10 = function ProductDetail10(props) {
10488
10516
  return Promise.reject(e);
10489
10517
  }
10490
10518
  };
10491
- var buyNow = function buyNow() {};
10519
+ var buyNow = function buyNow() {
10520
+ try {
10521
+ var _temp2 = function () {
10522
+ if (validateData()) {
10523
+ var _refInputQuantity$cur3;
10524
+ var quantity = refInputQuantity === null || refInputQuantity === void 0 ? void 0 : (_refInputQuantity$cur3 = refInputQuantity.current) === null || _refInputQuantity$cur3 === void 0 ? void 0 : _refInputQuantity$cur3.getValue();
10525
+ return Promise.resolve(addProductToCart(product, variant, quantity)).then(function () {
10526
+ handleRedirect("/carts");
10527
+ });
10528
+ }
10529
+ }();
10530
+ return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
10531
+ } catch (e) {
10532
+ return Promise.reject(e);
10533
+ }
10534
+ };
10492
10535
  var handleDisplayImage = function handleDisplayImage(item) {
10493
10536
  setDisplayImage(item);
10494
10537
  };
@@ -12704,5 +12747,5 @@ var ShopHighlights6 = function ShopHighlights6(props) {
12704
12747
  }));
12705
12748
  };
12706
12749
 
12707
- export { About1, About5, Address1, Banner1, Banner3, BannerFull1, BannerFull2, Booking1, BookingForm6, Breadcrumb1, Button, Carts1, Contact1, CustomerRating1, CustomerRating10, CustomerRating5, CustomerRating6, DateTimePicker, Employees1, Features1, Features2, Features3, Footer1, Footer7, Gallery1, Hero1, Hero10, Hero11, Hero11$1 as Hero12, Hero13, Hero2, Hero5, Hero6, Input, InputPhoneNumber, Links1, ModalNotification, NavBar1, NavBar7, PageTitle1, Partner1, ProductCategory2, ProductDetail10, ProductHighlight1, ProductHot1, ProductHot3, ProductItem2, ProductItem3, ProductItem4, ProductItem5, ProductItem6, ProductList5, ProductSale2, ProductSearch1, Products1, Products10, Products2, Products3, ProductsTop1, SearchBar2, SearchBar5, SearchBar6, SearchProduct1, SectionTitle1, SectionTitle2, SectionTitle3, Select$1 as Select, ServiceDetail1, ShopHighlights2, ShopHighlights5, ShopHighlights6, TextArea, TreatmentDetail1, TreatmentItem1, Treatments1, Treatments1$1 as Treatments2, TreatmentsList6 };
12750
+ export { About1, About5, Address1, Banner1, Banner3, BannerFull1, BannerFull2, Booking1, BookingForm6, Breadcrumb1, Button, Carts1, Contact1, CustomerRating1, CustomerRating10, CustomerRating5, CustomerRating6, DateTimePicker, Employees1, Features1, Features2, Features3, Footer1, Footer7, Gallery1, Hero1, Hero10, Hero11, Hero11$1 as Hero12, Hero13, Hero2, Hero5, Hero6, Input, InputPhoneNumber, Links1, ModalNotification, NavBar1, NavBar7, PageTitle1, Partner1, ProductCategory2, ProductDetail10, ProductHighlight1, ProductHot1, ProductHot3, ProductItem2, ProductItem3, ProductItem4, ProductItem5, ProductItem6, ProductItem7, ProductList5, ProductSale2, ProductSearch1, Products1, Products10, Products2, Products3, ProductsTop1, SearchBar2, SearchBar5, SearchBar6, SearchProduct1, SectionTitle1, SectionTitle2, SectionTitle3, Select$1 as Select, ServiceDetail1, ShopHighlights2, ShopHighlights5, ShopHighlights6, TextArea, TreatmentDetail1, TreatmentItem1, Treatments1, Treatments1$1 as Treatments2, TreatmentsList6 };
12708
12751
  //# sourceMappingURL=index.modern.js.map