@salla.sa/twilight-components 2.14.423 → 2.14.424
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/cjs/{filepond-Do86Z81F.js → filepond-DS8lFN12.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-BltmTwcK.js → filepond-plugin-file-poster-DOlur-Zr.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-D6qDjnWw.js → filepond-plugin-file-validate-size-8cdzV2Th.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-BTcaw3yC.js → filepond-plugin-file-validate-type-DlZs1kVq.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-BfSALTq0.js → filepond-plugin-image-edit-SIPcIJFA.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-YyoN3ZPE.js → filepond-plugin-image-exif-orientation-CISQ2nhQ.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-DPZhJU-S.js → filepond-plugin-image-preview-8n6MPTM9.js} +1 -1
- package/dist/cjs/{functions-Vqr_tH33.js → functions-BYHbilvv.js} +1 -1
- package/dist/cjs/{index-BKsfuSTK.js → index-D6qSyn6o.js} +1 -1
- package/dist/cjs/{index-B_ubSXmY.js → index-oFPXLGXi.js} +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +4 -2
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-booking-field_7.cjs.entry.js +10 -10
- package/dist/cjs/salla-bullet-delivery.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -20
- package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-map.cjs.entry.js +1 -1
- package/dist/cjs/salla-menu.cjs.entry.js +2 -13
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
- package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-reward-action_4.cjs.entry.js +6 -7
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/salla-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/{tracked-promise-DfEtIz3d.js → tracked-promise-UbTM_M6f.js} +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-n2ZBl__a.js → vanilla-picker-CyHLTyvk.js} +1 -1
- package/dist/collection/components/salla-bought-together/salla-bought-together.js +3 -1
- package/dist/collection/components/salla-cookies-bar/salla-cookies-bar.js +0 -40
- package/dist/collection/components/salla-loyalty-program/salla-reward-details.js +3 -4
- package/dist/collection/components/salla-menu/salla-menu.js +2 -34
- package/dist/components/index.js +2 -2
- package/dist/components/salla-bought-together.js +3 -1
- package/dist/components/salla-cookies-bar.js +1 -21
- package/dist/components/salla-menu.js +2 -15
- package/dist/components/salla-reward-details2.js +3 -4
- package/dist/esm/{filepond-C27NJlHY.js → filepond-BKuHui9z.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-CbA3Ow5D.js → filepond-plugin-file-poster-Dh39_0L1.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-DeVDysqG.js → filepond-plugin-file-validate-size-CcS_RyRW.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-Bk2vWN-H.js → filepond-plugin-file-validate-type-DpLuBo4I.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-MZT3Vams.js → filepond-plugin-image-edit-BV3ho0c6.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-CUi24gW6.js → filepond-plugin-image-exif-orientation-CCciy-YF.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-DNteLpdV.js → filepond-plugin-image-preview-hfHsj8OM.js} +1 -1
- package/dist/esm/{functions-WZTrXRSI.js → functions-Czm5P_7C.js} +1 -1
- package/dist/esm/{index-Z9TEkBrE.js → index-BdWSh9vH.js} +2 -2
- package/dist/esm/{index-xqn3qtN8.js → index-C5q-9m7l.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body_2.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +1 -1
- package/dist/esm/salla-add-product-button_5.entry.js +4 -2
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +1 -1
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-booking-field_7.entry.js +10 -10
- package/dist/esm/salla-bullet-delivery.entry.js +1 -1
- package/dist/esm/salla-cart-coupons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
- package/dist/esm/salla-comment-form_8.entry.js +1 -1
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-cookies-bar.entry.js +1 -20
- package/dist/esm/salla-count-down.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- package/dist/esm/salla-edit-order-button.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +1 -1
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-banner.entry.js +2 -2
- package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
- package/dist/esm/salla-loyalty-panel.entry.js +3 -3
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-program.entry.js +3 -3
- package/dist/esm/salla-loyalty-reward.entry.js +2 -2
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-map.entry.js +1 -1
- package/dist/esm/salla-menu.entry.js +2 -13
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-next-order-coupon.entry.js +1 -1
- package/dist/esm/salla-notification-item.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer-modal.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-placeholder.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-product-card_2.entry.js +1 -1
- package/dist/esm/salla-product-size-guide.entry.js +1 -1
- package/dist/esm/salla-products-list.entry.js +1 -1
- package/dist/esm/salla-progress-bar.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +1 -1
- package/dist/esm/salla-reward-action_4.entry.js +6 -7
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +1 -1
- package/dist/esm/salla-slider.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tab-content_3.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +1 -1
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +1 -1
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.entry.js +1 -1
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/{tracked-promise-9ayPcQ9V.js → tracked-promise-CGupCr4U.js} +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-DU5T_3-T.js → vanilla-picker-XBpFNS7X.js} +1 -1
- package/dist/twilight/p-01c8a84e.entry.js +4 -0
- package/dist/twilight/{p-6ab7c83d.entry.js → p-0705e86d.entry.js} +1 -1
- package/dist/twilight/{p-38eb6f08.entry.js → p-077ff83c.entry.js} +1 -1
- package/dist/twilight/p-0c299177.entry.js +4 -0
- package/dist/twilight/p-106c5b79.entry.js +4 -0
- package/dist/twilight/{p-b5c33519.entry.js → p-1186078e.entry.js} +1 -1
- package/dist/twilight/{p-847d884f.entry.js → p-15836ed9.entry.js} +1 -1
- package/dist/twilight/{p-d8d62f74.entry.js → p-15a8c7c6.entry.js} +1 -1
- package/dist/twilight/{p-61b6fac2.entry.js → p-163ebaf7.entry.js} +1 -1
- package/dist/twilight/{p-79d9b828.entry.js → p-168c942e.entry.js} +1 -1
- package/dist/twilight/{p-9410f28a.entry.js → p-1722e759.entry.js} +1 -1
- package/dist/twilight/{p-DG0XMtHg.js → p-1YpyVfkq.js} +1 -1
- package/dist/twilight/{p-15b8af3d.entry.js → p-1a796e26.entry.js} +1 -1
- package/dist/twilight/{p-aba22621.entry.js → p-1af3a167.entry.js} +1 -1
- package/dist/twilight/{p-f087988a.entry.js → p-1d508c88.entry.js} +1 -1
- package/dist/twilight/{p-f45efc0c.entry.js → p-23583546.entry.js} +1 -1
- package/dist/twilight/p-2437e4ac.entry.js +4 -0
- package/dist/twilight/{p-8631c200.entry.js → p-27c6128f.entry.js} +1 -1
- package/dist/twilight/{p-735e5378.entry.js → p-27f90256.entry.js} +1 -1
- package/dist/twilight/{p-c4bb47b0.entry.js → p-29cbf744.entry.js} +1 -1
- package/dist/twilight/{p-ef60225f.entry.js → p-2cb6feea.entry.js} +1 -1
- package/dist/twilight/{p-88c6e6ec.entry.js → p-2f530556.entry.js} +1 -1
- package/dist/twilight/{p-776a0bda.entry.js → p-34c1e701.entry.js} +1 -1
- package/dist/twilight/{p-d049f98a.entry.js → p-37397917.entry.js} +1 -1
- package/dist/twilight/{p-321d4374.entry.js → p-3fb699fb.entry.js} +1 -1
- package/dist/twilight/{p-25a9da9c.entry.js → p-41237614.entry.js} +1 -1
- package/dist/twilight/{p-c4a80854.entry.js → p-4ad0ea7c.entry.js} +1 -1
- package/dist/twilight/{p-31cdb580.entry.js → p-4dc5f354.entry.js} +1 -1
- package/dist/twilight/{p-d0898538.entry.js → p-4f1e3ebb.entry.js} +1 -1
- package/dist/twilight/{p-c038e432.entry.js → p-50002b57.entry.js} +1 -1
- package/dist/twilight/{p-be58b3a7.entry.js → p-538cf743.entry.js} +1 -1
- package/dist/twilight/{p-eed5585b.entry.js → p-55b5e8be.entry.js} +1 -1
- package/dist/twilight/{p-f423f1cf.entry.js → p-5b37732b.entry.js} +1 -1
- package/dist/twilight/{p-97033016.entry.js → p-5ba9c7db.entry.js} +1 -1
- package/dist/twilight/{p-9c36f5f1.entry.js → p-5bbc5ce6.entry.js} +1 -1
- package/dist/twilight/{p-75826fc3.entry.js → p-61abc2ef.entry.js} +1 -1
- package/dist/twilight/{p-6d4850df.entry.js → p-61eb0bc8.entry.js} +1 -1
- package/dist/twilight/{p-f4582cc9.entry.js → p-635738d0.entry.js} +1 -1
- package/dist/twilight/{p-51ccd249.entry.js → p-649268c1.entry.js} +1 -1
- package/dist/twilight/{p-1f3d64f3.entry.js → p-66c85e94.entry.js} +1 -1
- package/dist/twilight/{p-75066345.entry.js → p-6a2b2122.entry.js} +1 -1
- package/dist/twilight/{p-c7b15f0a.entry.js → p-6bb43f9d.entry.js} +1 -1
- package/dist/twilight/{p-b253d360.entry.js → p-77744cd4.entry.js} +1 -1
- package/dist/twilight/{p-15d242d1.entry.js → p-7f9c18d8.entry.js} +1 -1
- package/dist/twilight/{p-296b7778.entry.js → p-806d31ba.entry.js} +1 -1
- package/dist/twilight/{p-647a76d0.entry.js → p-813b762c.entry.js} +1 -1
- package/dist/twilight/{p-74362d6a.entry.js → p-85267471.entry.js} +1 -1
- package/dist/twilight/{p-10311a85.entry.js → p-86486b65.entry.js} +1 -1
- package/dist/twilight/{p-1357f11f.entry.js → p-88e2d340.entry.js} +1 -1
- package/dist/twilight/{p-c763b517.entry.js → p-8b807210.entry.js} +1 -1
- package/dist/twilight/{p-69d98642.entry.js → p-920a3f93.entry.js} +1 -1
- package/dist/twilight/{p-b7aa5623.entry.js → p-937b1d3f.entry.js} +1 -1
- package/dist/twilight/{p-a6429df2.entry.js → p-93a4254f.entry.js} +1 -1
- package/dist/twilight/{p-8b15a7c2.entry.js → p-9d16c043.entry.js} +1 -1
- package/dist/twilight/{p-dc1b4da2.entry.js → p-9ec5b3ec.entry.js} +1 -1
- package/dist/twilight/{p-BDJ2Ykel.js → p-B-CUQTrk.js} +1 -1
- package/dist/twilight/{p-C9yU50YT.js → p-B8u0sgnU.js} +1 -1
- package/dist/twilight/{p-ZJAW9yxk.js → p-BUZ_EM6t.js} +1 -1
- package/dist/twilight/{p-Z9TEkBrE.js → p-BdWSh9vH.js} +1 -1
- package/dist/twilight/{p-B7NkulJ-.js → p-Bvagw9Eb.js} +1 -1
- package/dist/twilight/{p-DqwP0D-u.js → p-CL1NQBQS.js} +1 -1
- package/dist/twilight/{p-CxlEUP15.js → p-CXWkL-Nl.js} +1 -1
- package/dist/twilight/{p-BlcvrTiO.js → p-Co4B1BYS.js} +1 -1
- package/dist/twilight/{p-CmoDOvZI.js → p-MdN_P6GB.js} +1 -1
- package/dist/twilight/{p-4208c68b.entry.js → p-a08bae8c.entry.js} +1 -1
- package/dist/twilight/{p-268c86dd.entry.js → p-a0c2d2fc.entry.js} +1 -1
- package/dist/twilight/{p-872b6790.entry.js → p-a2bf9399.entry.js} +1 -1
- package/dist/twilight/{p-fae2be1f.entry.js → p-a2cf36dd.entry.js} +1 -1
- package/dist/twilight/{p-777a765e.entry.js → p-a517605b.entry.js} +1 -1
- package/dist/twilight/{p-a9f85080.entry.js → p-a6980f8f.entry.js} +1 -1
- package/dist/twilight/{p-3175cab9.entry.js → p-a7292650.entry.js} +1 -1
- package/dist/twilight/{p-7d2ec078.entry.js → p-b49a7e3e.entry.js} +1 -1
- package/dist/twilight/{p-132d5758.entry.js → p-b5b4582b.entry.js} +1 -1
- package/dist/twilight/{p-2e69e2a7.entry.js → p-b9e27f4a.entry.js} +1 -1
- package/dist/twilight/{p-598c73c9.entry.js → p-ba7d2b19.entry.js} +1 -1
- package/dist/twilight/{p-58f17ecc.entry.js → p-bb684fb5.entry.js} +1 -1
- package/dist/twilight/{p-b785d75d.entry.js → p-bed2665e.entry.js} +1 -1
- package/dist/twilight/{p-9d30457e.entry.js → p-c4b60782.entry.js} +1 -1
- package/dist/twilight/{p-79340697.entry.js → p-c9a2317f.entry.js} +1 -1
- package/dist/twilight/{p-c19887c7.entry.js → p-cc41c0fa.entry.js} +1 -1
- package/dist/twilight/{p-93715135.entry.js → p-cda257aa.entry.js} +1 -1
- package/dist/twilight/{p-5bd92466.entry.js → p-cfdf044a.entry.js} +1 -1
- package/dist/twilight/{p-8138fe7c.entry.js → p-d1b0d5a6.entry.js} +1 -1
- package/dist/twilight/{p-cb476df4.entry.js → p-d93dda4f.entry.js} +1 -1
- package/dist/twilight/{p-475bfa77.entry.js → p-df0ef038.entry.js} +1 -1
- package/dist/twilight/{p-ea0b6753.entry.js → p-e09f41df.entry.js} +1 -1
- package/dist/twilight/{p-c2dd5774.entry.js → p-e14c7c23.entry.js} +1 -1
- package/dist/twilight/{p-612f2099.entry.js → p-e33b5cf9.entry.js} +1 -1
- package/dist/twilight/{p-93221e58.entry.js → p-e580c9e9.entry.js} +1 -1
- package/dist/twilight/{p-1aa4f79a.entry.js → p-ed767ba1.entry.js} +1 -1
- package/dist/twilight/{p-1e6a741d.entry.js → p-effcd169.entry.js} +1 -1
- package/dist/twilight/{p-1daa9a08.entry.js → p-fba1c62d.entry.js} +1 -1
- package/dist/twilight/{p-7d4c5da3.entry.js → p-ff8f343e.entry.js} +1 -1
- package/dist/twilight/{p-EhkdtrLx.js → p-kpU-gI-I.js} +1 -1
- package/dist/twilight/{p-BswrPpfs.js → p-qPitx-1F.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-cookies-bar/salla-cookies-bar.d.ts +0 -6
- package/dist/types/components/salla-menu/salla-menu.d.ts +0 -6
- package/dist/types/components.d.ts +0 -14
- package/package.json +5 -5
- package/dist/twilight/p-51eb69d7.entry.js +0 -4
- package/dist/twilight/p-9b64e741.entry.js +0 -4
- package/dist/twilight/p-c77bcf09.entry.js +0 -4
- package/dist/twilight/p-f82d4a36.entry.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{h as a,r as s}from"./p-
|
|
4
|
+
import{h as a,r as s}from"./p-BdWSh9vH.js";import{s as l}from"./p-B-Rj6b9M.js";import{n as o,a as t,c as r}from"./p-B-CUQTrk.js";import{S as e,a as i}from"./p-Bs6JxDkg.js";import{S as p}from"./p-CZRcMGA9.js";import{S as n}from"./p-D1s2kXqL.js";import{S as c}from"./p-QpH8MU22.js";import{S as y}from"./p-0-eTJXSD.js";import{S as m}from"./p-CXRKXFgT.js";import{T as g}from"./p-MdN_P6GB.js";import{a as d}from"./p-CgtvEd63.js";var h=function(a,s,l,o){var t,r=arguments.length,e=r<3?s:null===o?o=Object.getOwnPropertyDescriptor(s,l):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)e=Reflect.decorate(a,s,l,o);else for(var i=a.length-1;i>=0;i--)(t=a[i])&&(e=(r<3?t(e):r>3?t(s,l,e):t(s,l))||e);return r>3&&e&&Object.defineProperty(s,l,e),e};const u={all:a("span",{class:"s-loyalty-program-rewards-tab-icon",innerHTML:i}),free_shipping:a("span",{class:"s-loyalty-program-rewards-tab-icon",innerHTML:p}),coupon_discount:a("span",{class:"s-loyalty-program-rewards-tab-icon",innerHTML:e}),free_product:a("span",{class:"s-loyalty-program-rewards-tab-icon",innerHTML:n})},f=class{constructor(a){s(this,a),this.currentPrize=null,this.collapsed=!0,this.animatedPoints=0,this.handleExchangeSucceeded=()=>{this.points(),this.program()}}componentWillLoad(){return salla.onReady().then((()=>salla.lang.onLoaded())).then((()=>l())).then((()=>{this.program(),this.points(),salla.event.on("loyalty::exchange.succeeded",this.handleExchangeSucceeded)})).catch((a=>salla.logger.error(a)))}disconnectedCallback(){salla.event.off("loyalty::exchange.succeeded",this.handleExchangeSucceeded)}getOutlineItem(s,l,o){const t={1:a("span",{innerHTML:c}),2:a("span",{innerHTML:y}),3:a("span",{innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>cart-upload</title>\n<path d="M14.545 7.669l3.121-2.732v9.729c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-9.728l3.121 2.732c0.253 0.22 0.567 0.329 0.879 0.329 0.371 0 0.74-0.155 1.004-0.455 0.485-0.555 0.429-1.396-0.125-1.881l-5.333-4.667c-0.503-0.44-1.253-0.44-1.756 0l-5.333 4.667c-0.555 0.484-0.611 1.327-0.125 1.881 0.484 0.552 1.325 0.609 1.881 0.124zM30.647 5.371c-0.713-0.171-1.436 0.267-1.609 0.983l-2.744 11.363c-0.171 0.568-0.684 0.951-1.277 0.951h-12.136c-0.563 0-1.067-0.356-1.256-0.885l-6.035-16.896c-0.189-0.531-0.692-0.885-1.256-0.885h-2.667c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h1.727l5.719 16.012c0.567 1.588 2.081 2.655 3.768 2.655h12.136c1.78 0 3.32-1.145 3.851-2.92l2.763-11.433c0.173-0.716-0.267-1.436-0.983-1.609zM13.667 24c-2.205 0-4 1.795-4 4s1.795 4 4 4 4-1.795 4-4-1.795-4-4-4zM13.667 29.333c-0.735 0-1.333-0.599-1.333-1.333s0.599-1.333 1.333-1.333 1.333 0.599 1.333 1.333-0.599 1.333-1.333 1.333zM24.333 24c-2.205 0-4 1.795-4 4s1.795 4 4 4 4-1.795 4-4-1.795-4-4-4zM24.333 29.333c-0.735 0-1.333-0.599-1.333-1.333s0.599-1.333 1.333-1.333 1.333 0.599 1.333 1.333-0.599 1.333-1.333 1.333z"></path>\n</svg>\n'})};return a("li",{class:"s-loyalty-program-item"},a("div",{class:"s-loyalty-program-content"},a("span",{class:"s-loyalty-program-icon-container"},a("span",{class:"s-loyalty-program-text-gradient"},s),a("span",{class:"s-loyalty-program-icon"},t[s])),a("div",{class:"s-loyalty-program-title"},l),a("div",{class:"s-loyalty-program-description"},o)))}render(){if("error"===this.program.status)return a("p",null,salla.lang.get("common.errors.error_occured"));const s=this.program.data.points.slice(0,this.collapsed?t(this.program.data.points.length):this.program.data.points.length),l=this.program.data.prizes,o=this.program.data.prizes_count;return a("div",{class:"s-loyalty-program-container"},a("salla-loyalty-hero",{name:this.program.data.name,description:this.program.data.description,image:this.program.data.image},salla.config.isUser()?a("div",{slot:"crosspoint",class:"s-loyalty-program-profile-wrapper"},a("div",{class:"s-loyalty-program-profile-container"},a("div",{class:"s-loyalty-program-profile-points-section"},a("h2",{class:"s-loyalty-program-profile-label"},salla.lang.get("pages.loyalty_program.your_points")),a("p",{class:"s-loyalty-program-profile-points"},a("span",{class:"s-loyalty-program-profile-points-value"},this.animatedPoints?this.animatedPoints:this.points.data)," ",salla.lang.get("pages.loyalty_program.point"))),a("div",{class:"s-loyalty-program-profile-icon"},a("span",{innerHTML:m})))):a("button",{slot:"action",onClick:()=>salla.event.dispatch("login::open"),class:{"s-loyalty-program-login-action":!0,"s-loyalty-program-login-action-dark":!this.program.data.image,"s-loyalty-program-login-action-light":!!this.program.data.image}},salla.lang.get("blocks.header.login"))),a("div",{class:"s-loyalty-program-outline-section"},a("section",{class:"s-loyalty-program-section"},a("header",{class:"s-loyalty-program-header"},a("h1",{class:"s-loyalty-program-main-title"},salla.lang.get("pages.loyalty_program.how_to_start")),a("p",{class:"s-loyalty-program-subtitle"},salla.lang.get("pages.loyalty_program.three_simple_steps"))),a("ol",{class:"s-loyalty-program-list"},this.getOutlineItem(1,salla.lang.get("pages.loyalty_program.register"),salla.lang.get("pages.loyalty_program.create_account")),this.getOutlineItem(2,salla.lang.get("pages.loyalty_program.earn_points"),salla.lang.get("pages.loyalty_program.complete_tasks")),this.getOutlineItem(3,salla.lang.get("pages.loyalty_program.redeem_rewards"),salla.lang.get("pages.loyalty_program.enjoy_rewards"))))),a("div",{class:"s-loyalty-program-points-wrapper"},a("section",{class:"s-loyalty-program-points-section"},a("header",{class:"s-loyalty-program-points-header"},a("h1",{class:"s-loyalty-program-points-title"},this.program.data.promotion_title),a("p",{class:"s-loyalty-program-points-description"},this.program.data.promotion_description)),a("div",{class:"s-loyalty-program-points-spacer"}),a("ul",{class:{"s-loyalty-program-points-list-one":1===this.program.data.points.length,"s-loyalty-program-points-list-two":2===this.program.data.points.length,"s-loyalty-program-points-list-multi":this.program.data.points.length>2}},s.map((s=>a("li",null,a("salla-loyalty-point",{point:s}))))),a("div",{class:"s-loyalty-program-points-spacer"}),t(this.program.data.points.length)!==this.program.data.points.length&&a("button",{class:"s-loyalty-program-points-more-button",onClick:()=>this.collapsed=!this.collapsed},this.collapsed?a("span",null,salla.lang.get("pages.loyalty_program.show_more")," ",a("span",{style:{fontSize:"1.2rem",fontWeight:"300"}},"+")):a("span",null,salla.lang.get("pages.loyalty_program.show_less")," ",a("span",{style:{fontSize:"1.2rem",fontWeight:"300"}},"-"))))),"success"!==this.program.status?"":a("div",{class:"s-loyalty-program-rewards-container s-loyalty-program-slider-arrows-edges"},a("section",{class:{"s-loyalty-program-tabs-hider":l.length<=2||o<=4}},a("h1",{class:"s-loyalty-program-rewards-heading-mobile"},salla.lang.get("pages.loyalty_program.rewards")),a("salla-tabs",null,a("div",{slot:"header",class:"s-loyalty-program-rewards-tab-items"},l.map((s=>a("salla-tab-header",{slot:"header",name:s.type},u[s.type],a("span",null,s.title))))),a("h1",{slot:"header",class:"s-loyalty-program-rewards-heading-desktop"},salla.lang.get("pages.loyalty_program.rewards")),l.map((s=>a("salla-tab-content",{slot:"content",name:s.type},a("salla-slider",{id:s.type,type:"default","slider-config":'{"loop":false,"slidesPerView":"auto","freeMode":true,"spaceBetween":12,"breakpoints":{"768":{"slidesPerView":4,"spaceBetween":24,"freeMode":false,"speed":300}}}'},a("div",{slot:"items"},s.items.map((s=>a("salla-reward-card",{prize:s,onAreaClick:()=>{this.currentPrize=s,r((()=>this.detailsModal.open()))},onActionClick:()=>{this.currentPrize=s,r((()=>this.detailsModal.open()))}}))))))))),a("salla-modal",{ref:a=>this.detailsModal=a,class:"s-loyalty-program-modal",width:"md",noPadding:!0},this.currentPrize?a("salla-reward-details",{onActionClick:()=>r((()=>this.exchangeModal.open())),prize:this.currentPrize}):""),a("salla-modal",{ref:a=>this.exchangeModal=a,class:"s-loyalty-program-modal",width:"sm"},this.currentPrize?a("salla-reward-exchange",{prize:this.currentPrize}):""))))}};h([g((async function(){const{data:a}=await salla.loyalty.getProgram();return o(a)}),{initialData:{points:[],prizes:[],prizes_count:0}})],f.prototype,"program",void 0),h([g((async function(){const{data:a}=await salla.loyalty.getPoints();return d({targets:{value:0},value:a.points??0,round:1,easing:"easeOutQuad",duration:2e3,update:a=>{this.animatedPoints=a.animations[0].currentValue}}),a.points}))],f.prototype,"points",void 0),f.style="";export{f as salla_loyalty_program}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as s,c as t,h as i,H as e,a as r}from"./p-Z9TEkBrE.js";import{S as a}from"./p-CciN5Q_x.js";import{S as l}from"./p-DLNIOD9t.js";import{S as h}from"./p-8Tsmrwno.js";const o=class{constructor(i){s(this,i),this.quickOrderSubmited=t(this,"quickOrderSubmited"),this.quickOrderTitle="ليش تنتظر؟",this.subTitle="احصل على المنتج مباشرة الآن",this.payButtonTitle="اطلب المنتج",this.confirmPayButtonTitle="اشتر الآن",this.agreementText=salla.lang.get("pages.checkout.show_full_agreement"),this.isEmailRequired=!1,this.quickOrderStyle="default",this.isAvailable=!1,this.oneClick=!1,this.expanded=!1,this.isTermsRequired=!1,this.countryCode=salla.config.get("user.country_code","SA")||"SA",this.submitSucess=!1,this.placeHolderEmail=salla.lang.get("common.elements.email"),this.emailOptional=salla.lang.get("common.elements.optional"),this.agreementShowText=salla.lang.get("pages.checkout.show_full_agreement"),this.agreementModalHead=salla.lang.get("pages.checkout.full_agreement"),this.userNameLabel=salla.lang.get("pages.products.your_name"),this.termsChecked=!1,salla.onReady((()=>{this.productId=this.productId||salla.config.get("page.id")})),salla.lang.onLoaded((()=>{this.placeHolderEmail=salla.lang.get("common.elements.email"),this.emailOptional=salla.lang.get("common.elements.optional"),this.agreementShowText=salla.lang.get("pages.checkout.show_full_agreement"),this.agreementModalHead=salla.lang.get("pages.checkout.full_agreement"),this.userNameLabel=salla.lang.get("pages.products.your_name")}))}getBtnColor(){return"default"===this.quickOrderStyle?"light":"primary"}getErrorMessage(s,t){return"terms"==t?salla.lang.get("pages.checkout.check_agreement"):salla.lang.get(`common.errors.${s}`,{attribute:"name"==t?this.userNameLabel:this.placeHolderEmail})}handleInvalidInput(s){let t,i=s.target,e=i.validity;e.valueMissing?(t=this.getErrorMessage("field_required",i.name),console.log(this.getErrorMessage("field_required",i.name))):e.typeMismatch&&(t=this.getErrorMessage("invalid_value",i.name)),i.setCustomValidity(t)}async setWrapperHeight(){let s=this.host.querySelector(".s-quick-order-expandable");setTimeout((()=>{s.style.maxHeight=s.style.maxHeight||this.oneClick?null:s.scrollHeight+"px"}),50)}getDarkOrLight(){return"default"===this.quickOrderStyle&&salla.config.get("theme.color.is_dark")?"dark":"light"}getStyleColor(){return{gray:"#f3f3f3",white:"#ffffff",default:salla.config.get("theme.color.primary")}[this.quickOrderStyle]||"#f3f3f3"}async submit(s,t=!1){return s.preventDefault(),t&&!this.oneClick?(this.expanded=!this.expanded,void this.setWrapperHeight()):this.submitBtn.load().then((()=>this.getPayload())).then((s=>salla.api.cart.createQuickOrder(s))).then((()=>{setTimeout((()=>{this.submitBtn.stop(),this.submitSucess=!0,this.quickOrderSubmited.emit()}),200)})).catch((s=>s&&(console.error(s),this.submitBtn.stop())))}async getPayload(){return this.oneClick?{product_ids:[this.productId],agreement:!0}:{product_ids:[this.productId],email:this.emailInput?.value,phone:Number((await(this.phoneInput?.getValues()))?.phone),country_code:(await(this.phoneInput?.getValues()))?.countryCode||this.countryCode,name:this.nameInput?.value,agreement:this.termsChecked}}formatAgreementText(s,t=150){return s?s.length<=t?s:(new DOMParser).parseFromString(s,"text/html").documentElement.innerText.substring(0,t)+"...":""}loadQuickOrderSettings(){let s=salla.config.get("store.settings.quick_order");return s?(this.user=salla.config.get("user")||salla.storage.get("user")||{},this.countryCode=this.user?.country_code||this.countryCode,this.isEmailRequired=!this.user?.email&&this.isEmailRequired,this.oneClick=this.user?.email,this.initComponentData(s),Promise.resolve()):Promise.resolve()}initComponentData(s){this.quickOrderTitle=s.title,this.subTitle=s.sub_title,this.payButtonTitle=s.order_now_button,this.isEmailRequired=s.is_email_required,this.isTermsRequired=s.show_agreement,this.agreementText=s.agreement,this.confirmPayButtonTitle=s.confirm_button,this.thanksMessage=s.thanks_message,this.quickOrderStyle=s.style,this.isAvailable=!0,this.oneClick=this.oneClick&&!this.isTermsRequired}componentWillLoad(){return new Promise((s=>salla.onReady((()=>this.loadQuickOrderSettings().then(s)))))}render(){if(this.isAvailable)return this.submitSucess?i(e,{class:"s-quick-order"},i("div",{class:"s-quick-order-confirm",style:{backgroundColor:salla.config.get("theme.color.primary")+"10",borderColor:salla.config.get("theme.color.primary")+"10",color:salla.config.get("theme.color.primary")}},i("i",{innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>party-horn</title>\n<path fill="currentColor" d="M5.333 4.013c0.736 0 1.333-0.596 1.333-1.333v-0.013c0-0.737-0.597-1.327-1.333-1.327s-1.333 0.603-1.333 1.34 0.597 1.333 1.333 1.333zM11.333 10c0.341 0 0.683-0.131 0.943-0.391 1.541-1.54 2.391-3.589 2.391-5.771v-2.505c0-0.737-0.597-1.333-1.333-1.333s-1.333 0.596-1.333 1.333v2.505c0 1.468-0.572 2.848-1.609 3.885-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391zM18.667 9.993c0.319 0 0.639-0.115 0.895-0.345 0.383-0.347 0.684-0.325 1.497-0.22 0.923 0.124 2.319 0.307 3.636-0.887 1.293-1.172 1.303-2.54 1.308-3.539 0.005-0.887 0.043-1.228 0.432-1.581 0.361-0.327 0.621-0.335 1.493-0.216 0.923 0.12 2.317 0.307 3.635-0.884 0.545-0.495 0.587-1.337 0.093-1.883-0.493-0.547-1.336-0.589-1.884-0.093-0.361 0.325-0.621 0.333-1.493 0.216-0.921-0.119-2.317-0.305-3.635 0.884-1.293 1.173-1.303 2.541-1.308 3.54-0.005 0.885-0.043 1.227-0.432 1.58-0.383 0.348-0.683 0.327-1.497 0.22-0.924-0.124-2.32-0.305-3.636 0.887-0.545 0.495-0.587 1.339-0.092 1.884 0.264 0.291 0.625 0.437 0.988 0.437zM18.667 16.013c0.736 0 1.333-0.596 1.333-1.333v-0.013c0-0.737-0.597-1.327-1.333-1.327s-1.333 0.603-1.333 1.34 0.597 1.333 1.333 1.333zM30.667 17.333h-2.505c-2.179 0-4.228 0.849-5.771 2.391-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.603 0.391 0.944 0.391s0.683-0.131 0.943-0.391c1.023-1.023 2.439-1.609 3.884-1.609h2.505c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333zM30.667 10.66c-0.736 0-1.333 0.603-1.333 1.34s0.597 1.333 1.333 1.333 1.333-0.596 1.333-1.333v-0.013c0-0.736-0.597-1.327-1.333-1.327zM29.333 26.66c-0.736 0-1.333 0.603-1.333 1.34s0.597 1.333 1.333 1.333 1.333-0.596 1.333-1.333v-0.013c0-0.736-0.597-1.327-1.333-1.327zM7.456 11.057c-0.327-0.327-0.799-0.46-1.249-0.356-0.449 0.107-0.812 0.439-0.959 0.876l-5.036 15.113c-0.487 1.457-0.113 3.037 0.973 4.125 0.772 0.771 1.792 1.183 2.84 1.183 0.428 0 0.861-0.068 1.284-0.209l15.112-5.037c0.439-0.145 0.769-0.508 0.876-0.959 0.107-0.449-0.028-0.921-0.355-1.249zM4.467 29.259c-0.503 0.163-1.023 0.043-1.395-0.329-0.373-0.373-0.497-0.896-0.329-1.396l4.355-13.065 10.436 10.435z"></path>\n</svg>\n'}),i("span",null,this.thanksMessage))):i(e,{class:`s-quick-order s-quick-order-${this.getDarkOrLight()}`},i("div",{class:`s-quick-order-container s-quick-order-${this.quickOrderStyle}`,style:{backgroundColor:this.getStyleColor()}},i("div",{class:"s-quick-order-button-cont"},i("div",null,i("h3",null,this.quickOrderTitle),i("p",null,this.subTitle)),i("salla-button",{class:this.expanded?"s-quick-order-btn-close":"",onClick:s=>this.submit(s,!0),color:this.getBtnColor()},this.oneClick?this.confirmPayButtonTitle:this.expanded?i("i",{innerHTML:h}):this.confirmPayButtonTitle)),i("form",{onSubmit:s=>this.submit(s),class:"s-quick-order-expandable "+(this.expanded?"s-quick-order-shown":"")},Salla.config.isGuest()&&[i("div",{class:"s-form-group"},i("span",{innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>portrait</title>\n<path d="M24 1.333h-16c-3.676 0-6.667 2.991-6.667 6.667v16c0 3.028 2.041 5.561 4.811 6.371 0.004 0.001 0.008 0.003 0.012 0.004 0.591 0.172 1.2 0.292 1.844 0.292h16c0.644 0 1.253-0.12 1.843-0.292 0.004-0.001 0.008-0.003 0.012-0.004 2.771-0.809 4.812-3.343 4.812-6.371v-16c0-3.676-2.991-6.667-6.667-6.667zM8.012 28c0.121-1.915 3.363-4 7.988-4s7.868 2.085 7.988 4zM28 24c0 1.24-0.579 2.335-1.467 3.069-0.768-3.288-5.112-5.736-10.533-5.736s-9.765 2.448-10.533 5.736c-0.888-0.735-1.467-1.829-1.467-3.069v-16c0-2.205 1.795-4 4-4h16c2.205 0 4 1.795 4 4zM16 6.667c-3.308 0-6 2.692-6 6s2.692 6 6 6 6-2.692 6-6-2.692-6-6-6zM16 16c-1.839 0-3.333-1.495-3.333-3.333s1.495-3.333 3.333-3.333 3.333 1.495 3.333 3.333-1.495 3.333-3.333 3.333z"></path>\n</svg>\n'}),i("input",{type:"text",required:!0,class:"s-form-control s-quick-order-phone-field",name:"name",placeholder:this.userNameLabel,ref:s=>this.nameInput=s})),i("div",{class:"s-quick-order-flex-input"},i("div",{class:"s-form-group"},i("span",{innerHTML:a}),i("salla-tel-input",{ref:s=>this.phoneInput=s})),i("div",{class:"s-form-group"},i("span",{innerHTML:l}),i("input",{type:"email",class:"s-form-control s-quick-order-email-field",name:"email",required:this.isEmailRequired,placeholder:this.placeHolderEmail+" "+(this.isEmailRequired?"":this.emailOptional),ref:s=>this.emailInput=s})))],this.isTermsRequired&&i("label",{htmlFor:"terms",class:"s-quick-order-terms"},i("input",{type:"checkbox",required:!0,name:"terms",id:"terms",ref:s=>this.termsInput=s,onChange:()=>this.termsChecked=this.termsInput.checked,class:"s-checkbox"}),i("span",{class:"s-form-label"}," ",i("div",{innerHTML:this.formatAgreementText(this.agreementText,150)},this.agreementText.length>150&&i("salla-button",{shape:"link",onClick:()=>this.agreementModal.open()},this.agreementShowText))," ")),i("salla-button",{type:"submit",color:this.getBtnColor(),width:"wide",ref:s=>this.submitBtn=s},this.payButtonTitle)),i("salla-modal",{"modal-title":this.agreementModalHead,ref:s=>this.agreementModal=s},i("article",{innerHTML:this.agreementText}))))}componentDidLoad(){this.host.querySelectorAll("input").forEach((s=>{s.addEventListener("invalid",(s=>{this.handleInvalidInput(s)})),s.addEventListener("input",(()=>{s.setCustomValidity(""),s.reportValidity()}))}))}get host(){return r(this)}};o.style=".s-quick-order-expandable:not(.s-quick-order-shown){overflow:hidden}";export{o as salla_quick_order}
|
|
4
|
+
import{r as s,c as t,h as i,H as e,a as r}from"./p-BdWSh9vH.js";import{S as a}from"./p-CciN5Q_x.js";import{S as l}from"./p-DLNIOD9t.js";import{S as h}from"./p-8Tsmrwno.js";const o=class{constructor(i){s(this,i),this.quickOrderSubmited=t(this,"quickOrderSubmited"),this.quickOrderTitle="ليش تنتظر؟",this.subTitle="احصل على المنتج مباشرة الآن",this.payButtonTitle="اطلب المنتج",this.confirmPayButtonTitle="اشتر الآن",this.agreementText=salla.lang.get("pages.checkout.show_full_agreement"),this.isEmailRequired=!1,this.quickOrderStyle="default",this.isAvailable=!1,this.oneClick=!1,this.expanded=!1,this.isTermsRequired=!1,this.countryCode=salla.config.get("user.country_code","SA")||"SA",this.submitSucess=!1,this.placeHolderEmail=salla.lang.get("common.elements.email"),this.emailOptional=salla.lang.get("common.elements.optional"),this.agreementShowText=salla.lang.get("pages.checkout.show_full_agreement"),this.agreementModalHead=salla.lang.get("pages.checkout.full_agreement"),this.userNameLabel=salla.lang.get("pages.products.your_name"),this.termsChecked=!1,salla.onReady((()=>{this.productId=this.productId||salla.config.get("page.id")})),salla.lang.onLoaded((()=>{this.placeHolderEmail=salla.lang.get("common.elements.email"),this.emailOptional=salla.lang.get("common.elements.optional"),this.agreementShowText=salla.lang.get("pages.checkout.show_full_agreement"),this.agreementModalHead=salla.lang.get("pages.checkout.full_agreement"),this.userNameLabel=salla.lang.get("pages.products.your_name")}))}getBtnColor(){return"default"===this.quickOrderStyle?"light":"primary"}getErrorMessage(s,t){return"terms"==t?salla.lang.get("pages.checkout.check_agreement"):salla.lang.get(`common.errors.${s}`,{attribute:"name"==t?this.userNameLabel:this.placeHolderEmail})}handleInvalidInput(s){let t,i=s.target,e=i.validity;e.valueMissing?(t=this.getErrorMessage("field_required",i.name),console.log(this.getErrorMessage("field_required",i.name))):e.typeMismatch&&(t=this.getErrorMessage("invalid_value",i.name)),i.setCustomValidity(t)}async setWrapperHeight(){let s=this.host.querySelector(".s-quick-order-expandable");setTimeout((()=>{s.style.maxHeight=s.style.maxHeight||this.oneClick?null:s.scrollHeight+"px"}),50)}getDarkOrLight(){return"default"===this.quickOrderStyle&&salla.config.get("theme.color.is_dark")?"dark":"light"}getStyleColor(){return{gray:"#f3f3f3",white:"#ffffff",default:salla.config.get("theme.color.primary")}[this.quickOrderStyle]||"#f3f3f3"}async submit(s,t=!1){return s.preventDefault(),t&&!this.oneClick?(this.expanded=!this.expanded,void this.setWrapperHeight()):this.submitBtn.load().then((()=>this.getPayload())).then((s=>salla.api.cart.createQuickOrder(s))).then((()=>{setTimeout((()=>{this.submitBtn.stop(),this.submitSucess=!0,this.quickOrderSubmited.emit()}),200)})).catch((s=>s&&(console.error(s),this.submitBtn.stop())))}async getPayload(){return this.oneClick?{product_ids:[this.productId],agreement:!0}:{product_ids:[this.productId],email:this.emailInput?.value,phone:Number((await(this.phoneInput?.getValues()))?.phone),country_code:(await(this.phoneInput?.getValues()))?.countryCode||this.countryCode,name:this.nameInput?.value,agreement:this.termsChecked}}formatAgreementText(s,t=150){return s?s.length<=t?s:(new DOMParser).parseFromString(s,"text/html").documentElement.innerText.substring(0,t)+"...":""}loadQuickOrderSettings(){let s=salla.config.get("store.settings.quick_order");return s?(this.user=salla.config.get("user")||salla.storage.get("user")||{},this.countryCode=this.user?.country_code||this.countryCode,this.isEmailRequired=!this.user?.email&&this.isEmailRequired,this.oneClick=this.user?.email,this.initComponentData(s),Promise.resolve()):Promise.resolve()}initComponentData(s){this.quickOrderTitle=s.title,this.subTitle=s.sub_title,this.payButtonTitle=s.order_now_button,this.isEmailRequired=s.is_email_required,this.isTermsRequired=s.show_agreement,this.agreementText=s.agreement,this.confirmPayButtonTitle=s.confirm_button,this.thanksMessage=s.thanks_message,this.quickOrderStyle=s.style,this.isAvailable=!0,this.oneClick=this.oneClick&&!this.isTermsRequired}componentWillLoad(){return new Promise((s=>salla.onReady((()=>this.loadQuickOrderSettings().then(s)))))}render(){if(this.isAvailable)return this.submitSucess?i(e,{class:"s-quick-order"},i("div",{class:"s-quick-order-confirm",style:{backgroundColor:salla.config.get("theme.color.primary")+"10",borderColor:salla.config.get("theme.color.primary")+"10",color:salla.config.get("theme.color.primary")}},i("i",{innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>party-horn</title>\n<path fill="currentColor" d="M5.333 4.013c0.736 0 1.333-0.596 1.333-1.333v-0.013c0-0.737-0.597-1.327-1.333-1.327s-1.333 0.603-1.333 1.34 0.597 1.333 1.333 1.333zM11.333 10c0.341 0 0.683-0.131 0.943-0.391 1.541-1.54 2.391-3.589 2.391-5.771v-2.505c0-0.737-0.597-1.333-1.333-1.333s-1.333 0.596-1.333 1.333v2.505c0 1.468-0.572 2.848-1.609 3.885-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391zM18.667 9.993c0.319 0 0.639-0.115 0.895-0.345 0.383-0.347 0.684-0.325 1.497-0.22 0.923 0.124 2.319 0.307 3.636-0.887 1.293-1.172 1.303-2.54 1.308-3.539 0.005-0.887 0.043-1.228 0.432-1.581 0.361-0.327 0.621-0.335 1.493-0.216 0.923 0.12 2.317 0.307 3.635-0.884 0.545-0.495 0.587-1.337 0.093-1.883-0.493-0.547-1.336-0.589-1.884-0.093-0.361 0.325-0.621 0.333-1.493 0.216-0.921-0.119-2.317-0.305-3.635 0.884-1.293 1.173-1.303 2.541-1.308 3.54-0.005 0.885-0.043 1.227-0.432 1.58-0.383 0.348-0.683 0.327-1.497 0.22-0.924-0.124-2.32-0.305-3.636 0.887-0.545 0.495-0.587 1.339-0.092 1.884 0.264 0.291 0.625 0.437 0.988 0.437zM18.667 16.013c0.736 0 1.333-0.596 1.333-1.333v-0.013c0-0.737-0.597-1.327-1.333-1.327s-1.333 0.603-1.333 1.34 0.597 1.333 1.333 1.333zM30.667 17.333h-2.505c-2.179 0-4.228 0.849-5.771 2.391-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.603 0.391 0.944 0.391s0.683-0.131 0.943-0.391c1.023-1.023 2.439-1.609 3.884-1.609h2.505c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333zM30.667 10.66c-0.736 0-1.333 0.603-1.333 1.34s0.597 1.333 1.333 1.333 1.333-0.596 1.333-1.333v-0.013c0-0.736-0.597-1.327-1.333-1.327zM29.333 26.66c-0.736 0-1.333 0.603-1.333 1.34s0.597 1.333 1.333 1.333 1.333-0.596 1.333-1.333v-0.013c0-0.736-0.597-1.327-1.333-1.327zM7.456 11.057c-0.327-0.327-0.799-0.46-1.249-0.356-0.449 0.107-0.812 0.439-0.959 0.876l-5.036 15.113c-0.487 1.457-0.113 3.037 0.973 4.125 0.772 0.771 1.792 1.183 2.84 1.183 0.428 0 0.861-0.068 1.284-0.209l15.112-5.037c0.439-0.145 0.769-0.508 0.876-0.959 0.107-0.449-0.028-0.921-0.355-1.249zM4.467 29.259c-0.503 0.163-1.023 0.043-1.395-0.329-0.373-0.373-0.497-0.896-0.329-1.396l4.355-13.065 10.436 10.435z"></path>\n</svg>\n'}),i("span",null,this.thanksMessage))):i(e,{class:`s-quick-order s-quick-order-${this.getDarkOrLight()}`},i("div",{class:`s-quick-order-container s-quick-order-${this.quickOrderStyle}`,style:{backgroundColor:this.getStyleColor()}},i("div",{class:"s-quick-order-button-cont"},i("div",null,i("h3",null,this.quickOrderTitle),i("p",null,this.subTitle)),i("salla-button",{class:this.expanded?"s-quick-order-btn-close":"",onClick:s=>this.submit(s,!0),color:this.getBtnColor()},this.oneClick?this.confirmPayButtonTitle:this.expanded?i("i",{innerHTML:h}):this.confirmPayButtonTitle)),i("form",{onSubmit:s=>this.submit(s),class:"s-quick-order-expandable "+(this.expanded?"s-quick-order-shown":"")},Salla.config.isGuest()&&[i("div",{class:"s-form-group"},i("span",{innerHTML:'\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>portrait</title>\n<path d="M24 1.333h-16c-3.676 0-6.667 2.991-6.667 6.667v16c0 3.028 2.041 5.561 4.811 6.371 0.004 0.001 0.008 0.003 0.012 0.004 0.591 0.172 1.2 0.292 1.844 0.292h16c0.644 0 1.253-0.12 1.843-0.292 0.004-0.001 0.008-0.003 0.012-0.004 2.771-0.809 4.812-3.343 4.812-6.371v-16c0-3.676-2.991-6.667-6.667-6.667zM8.012 28c0.121-1.915 3.363-4 7.988-4s7.868 2.085 7.988 4zM28 24c0 1.24-0.579 2.335-1.467 3.069-0.768-3.288-5.112-5.736-10.533-5.736s-9.765 2.448-10.533 5.736c-0.888-0.735-1.467-1.829-1.467-3.069v-16c0-2.205 1.795-4 4-4h16c2.205 0 4 1.795 4 4zM16 6.667c-3.308 0-6 2.692-6 6s2.692 6 6 6 6-2.692 6-6-2.692-6-6-6zM16 16c-1.839 0-3.333-1.495-3.333-3.333s1.495-3.333 3.333-3.333 3.333 1.495 3.333 3.333-1.495 3.333-3.333 3.333z"></path>\n</svg>\n'}),i("input",{type:"text",required:!0,class:"s-form-control s-quick-order-phone-field",name:"name",placeholder:this.userNameLabel,ref:s=>this.nameInput=s})),i("div",{class:"s-quick-order-flex-input"},i("div",{class:"s-form-group"},i("span",{innerHTML:a}),i("salla-tel-input",{ref:s=>this.phoneInput=s})),i("div",{class:"s-form-group"},i("span",{innerHTML:l}),i("input",{type:"email",class:"s-form-control s-quick-order-email-field",name:"email",required:this.isEmailRequired,placeholder:this.placeHolderEmail+" "+(this.isEmailRequired?"":this.emailOptional),ref:s=>this.emailInput=s})))],this.isTermsRequired&&i("label",{htmlFor:"terms",class:"s-quick-order-terms"},i("input",{type:"checkbox",required:!0,name:"terms",id:"terms",ref:s=>this.termsInput=s,onChange:()=>this.termsChecked=this.termsInput.checked,class:"s-checkbox"}),i("span",{class:"s-form-label"}," ",i("div",{innerHTML:this.formatAgreementText(this.agreementText,150)},this.agreementText.length>150&&i("salla-button",{shape:"link",onClick:()=>this.agreementModal.open()},this.agreementShowText))," ")),i("salla-button",{type:"submit",color:this.getBtnColor(),width:"wide",ref:s=>this.submitBtn=s},this.payButtonTitle)),i("salla-modal",{"modal-title":this.agreementModalHead,ref:s=>this.agreementModal=s},i("article",{innerHTML:this.agreementText}))))}componentDidLoad(){this.host.querySelectorAll("input").forEach((s=>{s.addEventListener("invalid",(s=>{this.handleInvalidInput(s)})),s.addEventListener("input",(()=>{s.setCustomValidity(""),s.reportValidity()}))}))}get host(){return r(this)}};o.style=".s-quick-order-expandable:not(.s-quick-order-shown){overflow:hidden}";export{o as salla_quick_order}
|