@salla.sa/twilight-components 2.14.414 → 2.14.415
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-Dp_H5r_e.js → filepond-BSgA0m51.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-BhLJq633.js → filepond-plugin-file-poster-B_U56Mab.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-Bzp5Z1pf.js → filepond-plugin-file-validate-size-CMrqQo_q.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-ClWX5bbr.js → filepond-plugin-file-validate-type-DVXx7vBT.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-CQZ3PQWR.js → filepond-plugin-image-edit-DGNKXZ2S.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-NA--NS7o.js → filepond-plugin-image-exif-orientation-CDzotJbv.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-C9HHOV4A.js → filepond-plugin-image-preview-BpPTY8Td.js} +1 -1
- package/dist/cjs/{functions-PtQY5Mwc.js → functions-Dn6MANYA.js} +1 -1
- package/dist/cjs/{index-B-m5HL7n.js → index-B5bZG9f4.js} +1 -1
- package/dist/cjs/{index-BV8LF8_q.js → index-DKILCfeB.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- 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 +1 -1
- 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 -1
- 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 +1 -1
- 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-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.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 +3 -3
- 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-D3TH8tBr.js → tracked-promise-CYjUhHsR.js} +1 -1
- package/dist/cjs/twilight.cjs.js +1 -1
- package/dist/cjs/{vanilla-picker-BzsL3dA6.js → vanilla-picker-Cu_O9pv0.js} +1 -1
- package/dist/components/index.js +2 -2
- package/dist/esm/{filepond-DePctYW6.js → filepond-B3rUfZ_Q.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-BLTrMyXv.js → filepond-plugin-file-poster-DEDQEC6r.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-DS-qwPwO.js → filepond-plugin-file-validate-size--a2eBQUT.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-C5a7dkS0.js → filepond-plugin-file-validate-type-DxbdaAsO.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-Bn3oms-h.js → filepond-plugin-image-edit-DyPAs_ZT.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-C5xozSoC.js → filepond-plugin-image-exif-orientation-CECU3kdx.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-e9o-BI5K.js → filepond-plugin-image-preview-BvMmLc3M.js} +1 -1
- package/dist/esm/{functions-avO3JHt1.js → functions-DlXFEByO.js} +1 -1
- package/dist/esm/{index-6ZT_-rrT.js → index-BJrHu3Q4.js} +2 -2
- package/dist/esm/{index-DLd2oDnH.js → index-s83vHKfp.js} +1 -1
- package/dist/esm/loader.js +2 -2
- 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 +1 -1
- 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 -1
- 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 +1 -1
- 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-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.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 +3 -3
- 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-BCWK9qFO.js → tracked-promise-BpC4uz19.js} +1 -1
- package/dist/esm/twilight.js +2 -2
- package/dist/esm/{vanilla-picker-DWxX7cio.js → vanilla-picker-EWATXRmN.js} +1 -1
- package/dist/twilight/{p-09f2c951.entry.js → p-00ddd52f.entry.js} +1 -1
- package/dist/twilight/{p-881a00c8.entry.js → p-038c5d40.entry.js} +1 -1
- package/dist/twilight/{p-20764356.entry.js → p-0a768074.entry.js} +1 -1
- package/dist/twilight/{p-e054c3b2.entry.js → p-0eb6ff2f.entry.js} +1 -1
- package/dist/twilight/{p-29ff944d.entry.js → p-0f3c0d0b.entry.js} +1 -1
- package/dist/twilight/{p-15e2e287.entry.js → p-1340cc10.entry.js} +1 -1
- package/dist/twilight/{p-603b88a8.entry.js → p-14483d4f.entry.js} +1 -1
- package/dist/twilight/{p-6d3fdd76.entry.js → p-1a5ec95f.entry.js} +1 -1
- package/dist/twilight/{p-59e89ee3.entry.js → p-1bc51071.entry.js} +1 -1
- package/dist/twilight/{p-af7a4f68.entry.js → p-1bcf0168.entry.js} +1 -1
- package/dist/twilight/{p-eb073d38.entry.js → p-1cfc81cb.entry.js} +1 -1
- package/dist/twilight/{p-d02e8b25.entry.js → p-1dabd43d.entry.js} +1 -1
- package/dist/twilight/{p-861203e4.entry.js → p-1e542b72.entry.js} +1 -1
- package/dist/twilight/{p-80f95744.entry.js → p-1efb7a3d.entry.js} +1 -1
- package/dist/twilight/{p-1affa2bf.entry.js → p-1f421639.entry.js} +1 -1
- package/dist/twilight/{p-29463486.entry.js → p-20a86446.entry.js} +1 -1
- package/dist/twilight/{p-352a6706.entry.js → p-23a530eb.entry.js} +1 -1
- package/dist/twilight/{p-4ad1939b.entry.js → p-26b97651.entry.js} +1 -1
- package/dist/twilight/{p-48f1953b.entry.js → p-291693b7.entry.js} +1 -1
- package/dist/twilight/p-293a2370.entry.js +4 -0
- package/dist/twilight/{p-af2fb7b2.entry.js → p-2b6e8d69.entry.js} +1 -1
- package/dist/twilight/{p-6673ee84.entry.js → p-2c99cc69.entry.js} +1 -1
- package/dist/twilight/{p-87ba43f4.entry.js → p-31c8711f.entry.js} +1 -1
- package/dist/twilight/{p-b1137d6a.entry.js → p-3201fa7d.entry.js} +1 -1
- package/dist/twilight/{p-4c9e53ef.entry.js → p-32644ff6.entry.js} +1 -1
- package/dist/twilight/{p-0d2707d1.entry.js → p-34900416.entry.js} +1 -1
- package/dist/twilight/{p-b30e4954.entry.js → p-3f02973f.entry.js} +1 -1
- package/dist/twilight/{p-19615f59.entry.js → p-404c2e14.entry.js} +1 -1
- package/dist/twilight/{p-d75c4d8f.entry.js → p-4370441c.entry.js} +1 -1
- package/dist/twilight/{p-19af24cd.entry.js → p-479420b3.entry.js} +1 -1
- package/dist/twilight/{p-a326832f.entry.js → p-4aa90fca.entry.js} +1 -1
- package/dist/twilight/{p-89409e62.entry.js → p-4b7be330.entry.js} +1 -1
- package/dist/twilight/{p-083e1a33.entry.js → p-4bef45b0.entry.js} +1 -1
- package/dist/twilight/{p-7060d38e.entry.js → p-4cf8947e.entry.js} +1 -1
- package/dist/twilight/{p-de2d21e1.entry.js → p-4fb84597.entry.js} +1 -1
- package/dist/twilight/{p-611b6487.entry.js → p-555eb535.entry.js} +1 -1
- package/dist/twilight/{p-78e1c27b.entry.js → p-5b78a478.entry.js} +1 -1
- package/dist/twilight/{p-3e5e5939.entry.js → p-5c4dcfbf.entry.js} +1 -1
- package/dist/twilight/{p-2caf7100.entry.js → p-5c710f88.entry.js} +1 -1
- package/dist/twilight/{p-4f4a9efe.entry.js → p-5de3e90f.entry.js} +1 -1
- package/dist/twilight/{p-e4ee1bb9.entry.js → p-62bc6e04.entry.js} +1 -1
- package/dist/twilight/{p-ed39ea6e.entry.js → p-65cece5f.entry.js} +1 -1
- package/dist/twilight/{p-8ae540e2.entry.js → p-66b013a9.entry.js} +1 -1
- package/dist/twilight/{p-b6ee8954.entry.js → p-67617d49.entry.js} +1 -1
- package/dist/twilight/{p-3763e5ac.entry.js → p-6c5450b6.entry.js} +1 -1
- package/dist/twilight/{p-95ff5c23.entry.js → p-7810ffdb.entry.js} +1 -1
- package/dist/twilight/{p-4b3cd6e7.entry.js → p-78fa7baa.entry.js} +1 -1
- package/dist/twilight/{p-33498ca4.entry.js → p-7bae206a.entry.js} +1 -1
- package/dist/twilight/{p-c98464bd.entry.js → p-7f41d7a1.entry.js} +1 -1
- package/dist/twilight/{p-20cfe41f.entry.js → p-8246a2a1.entry.js} +1 -1
- package/dist/twilight/{p-ffb2c726.entry.js → p-8a8952c9.entry.js} +1 -1
- package/dist/twilight/{p-e513efab.entry.js → p-8dfd35fd.entry.js} +1 -1
- package/dist/twilight/{p-0ee39d71.entry.js → p-8e37135a.entry.js} +1 -1
- package/dist/twilight/{p-b05422f7.entry.js → p-8eaf0791.entry.js} +1 -1
- package/dist/twilight/{p-4fccc704.entry.js → p-909a325c.entry.js} +1 -1
- package/dist/twilight/{p-ccbc611f.entry.js → p-90c2bb26.entry.js} +1 -1
- package/dist/twilight/{p-4cc69951.entry.js → p-96dfe5f7.entry.js} +1 -1
- package/dist/twilight/{p-4b55f671.entry.js → p-995be2a3.entry.js} +1 -1
- package/dist/twilight/{p-CaURqicX.js → p-B--H81EX.js} +1 -1
- package/dist/twilight/{p-6ZT_-rrT.js → p-BJrHu3Q4.js} +2 -2
- package/dist/twilight/{p-C4Sm8mDk.js → p-BhL20bfQ.js} +1 -1
- package/dist/twilight/{p-RUoY6zEi.js → p-BokHJNvn.js} +1 -1
- package/dist/twilight/{p-DZCJAoVw.js → p-C50OVcDe.js} +2 -2
- package/dist/twilight/{p-BbupQHPq.js → p-CbR-jw9t.js} +1 -1
- package/dist/twilight/{p-CZCe7gL1.js → p-Cn23iQH-.js} +1 -1
- package/dist/twilight/{p-BwkVGCUs.js → p-CraZjTa1.js} +1 -1
- package/dist/twilight/{p-C5kLhs7f.js → p-CyRmFTSk.js} +1 -1
- package/dist/twilight/{p-Ce_mZAOv.js → p-DDjn6-rT.js} +1 -1
- package/dist/twilight/{p-C3wnAzO7.js → p-DJMIuJ3l.js} +1 -1
- package/dist/twilight/{p-9436c499.entry.js → p-a1be369b.entry.js} +1 -1
- package/dist/twilight/{p-0efac7e2.entry.js → p-b3338aba.entry.js} +1 -1
- package/dist/twilight/{p-16c2826c.entry.js → p-b4560bcf.entry.js} +1 -1
- package/dist/twilight/{p-a5c01307.entry.js → p-b45e0eb4.entry.js} +1 -1
- package/dist/twilight/{p-a0db4ef2.entry.js → p-b866c259.entry.js} +1 -1
- package/dist/twilight/{p-356df60b.entry.js → p-c84ac61b.entry.js} +1 -1
- package/dist/twilight/{p-297cd58e.entry.js → p-caa664d2.entry.js} +1 -1
- package/dist/twilight/{p-15f6bb69.entry.js → p-cad60fb9.entry.js} +1 -1
- package/dist/twilight/{p-4a654724.entry.js → p-ccf80fc5.entry.js} +1 -1
- package/dist/twilight/{p-35449c67.entry.js → p-ce6c21be.entry.js} +1 -1
- package/dist/twilight/{p-515958ec.entry.js → p-d0f37850.entry.js} +1 -1
- package/dist/twilight/{p-11c9a417.entry.js → p-d2cee8e2.entry.js} +1 -1
- package/dist/twilight/{p-afdccf8a.entry.js → p-d32a5200.entry.js} +1 -1
- package/dist/twilight/{p-edba3e00.entry.js → p-db66c636.entry.js} +1 -1
- package/dist/twilight/{p-c2eaa583.entry.js → p-df385d43.entry.js} +1 -1
- package/dist/twilight/{p-7f9cf58a.entry.js → p-e2dddc75.entry.js} +1 -1
- package/dist/twilight/{p-b5cada55.entry.js → p-e2facd9b.entry.js} +1 -1
- package/dist/twilight/{p-969c474d.entry.js → p-e715cf82.entry.js} +1 -1
- package/dist/twilight/{p-97277641.entry.js → p-e9e0b4b0.entry.js} +1 -1
- package/dist/twilight/{p-5333d535.entry.js → p-f0fed4a2.entry.js} +1 -1
- package/dist/twilight/{p-8f8045fa.entry.js → p-f2ee2742.entry.js} +1 -1
- package/dist/twilight/{p-f72f19b4.entry.js → p-f2f94c2a.entry.js} +1 -1
- package/dist/twilight/{p-2f1157d9.entry.js → p-f9ec3859.entry.js} +1 -1
- package/dist/twilight/{p-DU8NQm6S.js → p-sXTTBYrW.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/package.json +5 -5
- package/dist/twilight/p-03ec20de.entry.js +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-BJrHu3Q4.js';
|
|
5
5
|
|
|
6
6
|
const sallaOrderEditItemCss = "";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h } from './index-
|
|
4
|
+
import { r as registerInstance, h } from './index-BJrHu3Q4.js';
|
|
5
5
|
import { S as SICheck } from './check-BZp0rKEO.js';
|
|
6
6
|
|
|
7
7
|
var iconFileArchive = `<!-- Generated by IcoMoon.io -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, a as getElement } from './index-BJrHu3Q4.js';
|
|
5
5
|
import { H as Helper } from './Helper-DFMXF2_h.js';
|
|
6
6
|
import './anime.es-CgtvEd63.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-BJrHu3Q4.js';
|
|
5
5
|
|
|
6
6
|
const sallaPaymentsCss = ":host{display:block}";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host } from './index-BJrHu3Q4.js';
|
|
5
5
|
|
|
6
6
|
var Inbox = `<!-- Generated by IcoMoon.io -->
|
|
7
7
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-BJrHu3Q4.js';
|
|
5
5
|
import { a as arrowLeft } from './arrow-left-BedNk7k1.js';
|
|
6
6
|
|
|
7
7
|
var arrowRight = `<!-- Generated by IcoMoon.io -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-BJrHu3Q4.js';
|
|
5
5
|
import { S as Star } from './star2-D4oPi1Ov.js';
|
|
6
6
|
import { H as Helper } from './Helper-DFMXF2_h.js';
|
|
7
7
|
import './anime.es-CgtvEd63.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, a as getElement } from './index-BJrHu3Q4.js';
|
|
5
5
|
|
|
6
6
|
var PencilRuler = `<!-- Generated by IcoMoon.io -->
|
|
7
7
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-BJrHu3Q4.js';
|
|
5
5
|
import { a as anime } from './anime.es-CgtvEd63.js';
|
|
6
6
|
import { S as ShoppingBag } from './shopping-bag-DiKTtDW5.js';
|
|
7
7
|
import { H as Helper } from './Helper-DFMXF2_h.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-BJrHu3Q4.js';
|
|
5
5
|
import { S as SIiPhoneX } from './iphone-x-CciN5Q_x.js';
|
|
6
6
|
import { S as SIMail } from './mail-DLNIOD9t.js';
|
|
7
7
|
import { S as SICancel } from './cancel-8Tsmrwno.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-BJrHu3Q4.js';
|
|
5
5
|
import { W as WishListIcon } from './star-ZT7ehBBk.js';
|
|
6
6
|
import { C as CheckCircle2 } from './check-circle2-BV4kqbdL.js';
|
|
7
7
|
import { H as Helper } from './Helper-DFMXF2_h.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
5
|
-
import { c as closeModals, b as brand_path, f as formattedPointsJsx } from './functions-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-BJrHu3Q4.js';
|
|
5
|
+
import { c as closeModals, b as brand_path, f as formattedPointsJsx } from './functions-DlXFEByO.js';
|
|
6
6
|
import { S as SIGift } from './gift-CXRKXFgT.js';
|
|
7
7
|
import { S as SITag } from './tag-cgSL_BIo.js';
|
|
8
8
|
import { S as SICheck } from './check-BZp0rKEO.js';
|
|
9
9
|
import { S as SICancel } from './cancel-8Tsmrwno.js';
|
|
10
|
-
import { T as TrackedPromise } from './tracked-promise-
|
|
10
|
+
import { T as TrackedPromise } from './tracked-promise-BpC4uz19.js';
|
|
11
11
|
|
|
12
12
|
const sallaLoyaltyProgramCss$3 = "";
|
|
13
13
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host } from './index-BJrHu3Q4.js';
|
|
5
5
|
import { S as Search } from './search-BscTeWDc.js';
|
|
6
6
|
|
|
7
7
|
var StoreAlt = `<!-- Generated by IcoMoon.io -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, a as getElement } from './index-BJrHu3Q4.js';
|
|
5
5
|
import { S as Search } from './search-BscTeWDc.js';
|
|
6
6
|
import { H as Helper } from './Helper-DFMXF2_h.js';
|
|
7
7
|
import './anime.es-CgtvEd63.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-BJrHu3Q4.js';
|
|
5
5
|
import { a as ArrowRightIcon, A as ArrowLeftIcon } from './keyboard_arrow_right-Vqpj4CWE.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, a as getElement } from './index-BJrHu3Q4.js';
|
|
5
5
|
import { a as anime } from './anime.es-CgtvEd63.js';
|
|
6
6
|
import { f as facebook, t as twitter } from './facebook-CO-PeZ27.js';
|
|
7
7
|
import { S as SIMail } from './mail-DLNIOD9t.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-BJrHu3Q4.js';
|
|
5
5
|
import { f as facebook, t as twitter } from './facebook-CO-PeZ27.js';
|
|
6
6
|
|
|
7
7
|
var instagram = `<!-- Generated by IcoMoon.io -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, c as createEvent, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, c as createEvent, a as getElement } from './index-BJrHu3Q4.js';
|
|
5
5
|
|
|
6
6
|
const sallaTabContentCss = "";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, a as getElement } from './index-BJrHu3Q4.js';
|
|
5
5
|
|
|
6
6
|
const sallaTooltipCss = ".s-tooltip-container{position:relative;display:inline-block}.s-tooltip-item{position:absolute;transform:translateX(-39%);background-color:#baf3e6;color:#004d5a;bottom:100%;left:50%;text-align:center;border-radius:5px;z-index:1;white-space:nowrap;opacity:0;transition:opacity 0.3s;pointer-events:none;margin:0 0 16px 8px;padding:12px;max-width:150px;width:190px;white-space:normal;opacity:1}.s-tooltip-item::after{content:\"\";position:absolute;bottom:-10px;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#baf3e6 transparent transparent transparent}.s-tooltip-item:dir(ltr){transform:translateX(-72%)}.s-tooltip-item--dark{background-color:#555555;color:white;padding:5px 15px;border-radius:8px;font-size:12px;font-weight:normal;max-width:330px;width:max-content}.s-tooltip-item--dark::after{border-color:#555555 transparent transparent transparent}";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-BJrHu3Q4.js';
|
|
5
5
|
import { A as ArrowDown } from './keyboard_arrow_down-DCZbpt2a.js';
|
|
6
6
|
import { B as BellRing } from './bell-ring-D3mWkc-3.js';
|
|
7
7
|
import { P as PendingOrdersIcon } from './cart-DY4LZmNP.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h } from './index-
|
|
4
|
+
import { r as registerInstance, h } from './index-BJrHu3Q4.js';
|
|
5
5
|
import { G as Genders } from './interfaces-OF8QcbMM.js';
|
|
6
6
|
|
|
7
7
|
const sallaUserProfileCss = ":host{display:block}";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host } from './index-BJrHu3Q4.js';
|
|
5
5
|
|
|
6
6
|
var Bullhorn = `<!-- Generated by IcoMoon.io -->
|
|
7
7
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-BJrHu3Q4.js';
|
|
5
5
|
import { S as SIMail } from './mail-DLNIOD9t.js';
|
|
6
6
|
|
|
7
7
|
var AndroidPhoneIcon = `<!-- Generated by IcoMoon.io -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host } from './index-BJrHu3Q4.js';
|
|
5
5
|
|
|
6
6
|
const sallaWalletCss = ".s-wallet-table{min-width:100%}.s-wallet-table-balance-container{display:flex !important;align-items:center !important;justify-content:flex-start !important;gap:1rem}.s-wallet-table-balance-icon{border-radius:50%;width:52px;height:52px;font-size:25px;padding:16px 13px;background:var(--color-primary-reverse);color:var(--color-primary)}.s-wallet-table-empty-state{display:flex;flex-direction:column;align-items:center}.s-wallet-table-empty-state i{font-size:80px;margin:4rem 0 2rem;color:var(--infinte-color)}.s-wallet-table-transaction-status{padding:6px 19px !important;border-radius:20px;width:max-content;display:flex;align-items:center}.s-wallet-table-transaction-status-default{background:#fff6eb;color:#a46f29}.s-wallet-table-transaction-status-cashback{background:#effbf6;color:#00af6c}.s-wallet-table-transaction-status-refund{background:#ecf3fe;color:#5196f3}.s-wallet-table-transaction-status-purchase{background:#feecec;color:#f55157}.s-wallet-table-transaction-status-icons-success{color:#00af6c}";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { f as forceUpdate } from './index-
|
|
4
|
+
import { f as forceUpdate } from './index-BJrHu3Q4.js';
|
|
5
5
|
|
|
6
6
|
function TrackedPromise(fn, options = {}) {
|
|
7
7
|
options = Object.assign({ initialData: undefined, initialStatus: 'idle' }, options);
|
package/dist/esm/twilight.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './index-
|
|
5
|
-
export { s as setNonce } from './index-
|
|
4
|
+
import { p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './index-BJrHu3Q4.js';
|
|
5
|
+
export { s as setNonce } from './index-BJrHu3Q4.js';
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Patch Browser v4.35.1 | MIT Licensed | https://stenciljs.com
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as s,H as i}from"./p-
|
|
4
|
+
import{r as t,h as s,H as i}from"./p-BJrHu3Q4.js";const e=class{constructor(s){t(this,s),this.size="md",this.color="dark",this.digits="auto",this.autoSegments=!1,this.daysLabel=salla.lang.getWithDefault("pages.checkout.day","يوم"),this.hoursLabel=salla.lang.getWithDefault("pages.checkout.hour","ساعة"),this.minutesLabel=salla.lang.getWithDefault("pages.checkout.minute","دقيقة"),this.secondsLabel=salla.lang.getWithDefault("pages.checkout.second","ثانية"),this.endLabel=salla.lang.getWithDefault("pages.checkout.offer_ended","انتهت مدة العرض"),this.invalidDate=salla.lang.getWithDefault("blocks.buy_as_gift.incorrect_date","الرجاء إدخال الموعد بشكل صحيح"),this.offerEnded=!1,this.parseFailed=!1,this.showDays=!0,this.showHours=!0,this.days=this.number(0),this.hours=this.number(0),this.minutes=this.number(0),this.seconds=this.number(0),salla.lang.onLoaded((()=>{this.daysLabel=salla.lang.getWithDefault("pages.checkout.day","يوم"),this.hoursLabel=salla.lang.getWithDefault("pages.checkout.hour","ساعة"),this.minutesLabel=salla.lang.getWithDefault("pages.checkout.minute","دقيقة"),this.invalidDate=salla.lang.getWithDefault("blocks.buy_as_gift.incorrect_date","الرجاء إدخال الموعد بشكل صحيح"),this.secondsLabel=salla.lang.getWithDefault("pages.checkout.second","ثانية"),this.endLabel=salla.lang.getWithDefault("pages.checkout.offer_ended","انتهت مدة العرض")})),this.date&&this.isValidDate(this.date)&&this.startCountDown()}async endCountDown(){clearInterval(this.countInterval),this.offerEnded=!0,this.days=this.number(0),this.hours=this.number(0),this.minutes=this.number(0),this.seconds=this.number(0)}componentWillLoad(){if("string"==typeof this.preOrder)try{this.normalizedPreOrder=JSON.parse(this.preOrder)}catch{this.normalizedPreOrder=void 0}else this.normalizedPreOrder=this.preOrder;this.normalizedPreOrder?.end_date&&(this.date=this.normalizedPreOrder.end_date),this.date&&this.isValidDate(this.date)&&this.startCountDown()}normalizeDate(t){const s=t.match(/^(\d{1,2})-(\d{1,2})-(\d{4}),(\d{1,2}):(\d{2}):(\d{2})\s*(am|pm)$/i);if(s){const[,t,i,e,n,h,o,a]=s;let r=parseInt(n,10);"pm"===a.toLowerCase()&&r<12&&(r+=12),"am"===a.toLowerCase()&&12===r&&(r=0);const l=String(r).padStart(2,"0");return`${e}-${String(t).padStart(2,"0")}-${String(i).padStart(2,"0")} ${l}:${h}:${o}`}const i=t.match(/^(\d{1,2})-(\d{1,2})-(\d{4})$/);if(i){const[,t,s,e]=i;return`${e}-${String(t).padStart(2,"0")}-${String(s).padStart(2,"0")}`}const e=t.match(/^(\d{4})-(\d{1,2})-(\d{1,2})(?:[ T](\d{1,2}:\d{2}:\d{2}))?$/);if(e){const[,t,s,i,n]=e,h=String(s).padStart(2,"0"),o=String(i).padStart(2,"0");return n?`${t}-${h}-${o} ${n}`:`${t}-${h}-${o}`}return t}isValidDate(t){const s=this.normalizeDate(t);let i,e=s.includes("-"),n=s.split(" ");return i=e?n[0].replace(/-/g,"/"):n[0],!isNaN(Date.parse(i))}number(t){return salla.helpers.number(t,"en"===this.digits)}startCountDown(){const t=this.normalizeDate(this.date),s=t.includes("-"),i=this.endOfDay||1===t.split(" ").length;let e;if(s){const s=i?`${t.split(" ")[0]}T23:59:59+03:00`:`${t.replace(" ","T")}+03:00`;e=new Date(s).getTime()}else{const s=new Date(t);i&&s.setHours(23,59,59,999),e=s.getTime()}if(Number.isNaN(e))return salla.logger.warn(`[salla-count-down] unable to parse date: "${this.date}"`),void(this.parseFailed=!0);const n=()=>{const t=e-Date.now(),s=Math.floor(t/864e5),i=Math.floor(t%864e5/36e5);this.days=this.number(s),this.hours=this.number(i),this.minutes=this.number(Math.floor(t%36e5/6e4)),this.seconds=this.number(Math.floor(t%6e4/1e3)),this.autoSegments&&(this.showDays=s>0,this.showHours=s>0||i>0),t<0&&this.endCountDown()};this.countInterval=setInterval(n,1e3),n()}renderCountDown(){const t=this.boxTheme?`var(--color-${this.boxTheme})`:this.boxColor,i=this.boxed&&t?{backgroundColor:t}:void 0;return s("ul",{class:`s-count-down-list ${this.boxed?"s-count-down-boxed":""} ${this.offerEnded?"s-count-down-ended":""} s-count-down-${this.size} s-count-down-${this.color}`,style:this.listPadding?{paddingLeft:this.listPadding,paddingRight:this.listPadding}:void 0},s("li",{class:"s-count-down-item",style:i},s("div",{class:"s-count-down-item-value"},this.seconds),this.labeled&&s("div",{class:"s-count-down-item-label"},this.secondsLabel)),s("li",{class:"s-count-down-item",style:i},s("div",{class:"s-count-down-item-value"},this.minutes),this.labeled&&s("div",{class:"s-count-down-item-label"},this.minutesLabel)),(!this.autoSegments||this.showHours)&&s("li",{class:"s-count-down-item",style:i},s("div",{class:"s-count-down-item-value"},this.hours),this.labeled&&s("div",{class:"s-count-down-item-label"},this.hoursLabel)),(!this.autoSegments||this.showDays)&&s("li",{class:"s-count-down-item",style:i},s("div",{class:"s-count-down-item-value"},this.days),this.labeled&&s("div",{class:"s-count-down-item-label"},this.daysLabel)))}renderInvalidDate(){return s("div",{class:"s-count-down-text-center"},this.invalidDate)}renderOfferEnded(){return s("div",{class:"s-count-down-end-text"},this.endText?this.endText:this.endLabel)}renderPreOrderToBeAvailableOn(){return this.normalizedPreOrder?.availability_date&&this.isValidDate(this.normalizedPreOrder?.availability_date)?s("div",{class:"s-count-down-info-message"},s("i",{class:"sicon-info"}),s("span",null,salla.lang.getWithDefault("pages.products.expected_to_be","متوقَّع توفُّره بتاريخ:")),s("span",null,new Date(this.normalizedPreOrder?.availability_date).toLocaleDateString(salla.lang.locale,{weekday:"long",year:"numeric",month:"long",day:"numeric"}))):null}renderPreOrderCountDown(){return this.normalizedPreOrder?.activate_countdown?s("div",{class:"s-count-down-pre-order-container"},s("p",{class:"text-sm "},salla.lang.getWithDefault("pages.products.pre_order_ends_in","ينتهي الطلب المسبق خلال:")),this.renderCountDown()):null}renderPreOrder(){return s("div",null,"object"==typeof this.normalizedPreOrder&&this.normalizedPreOrder?.availability_date&&this.renderPreOrderToBeAvailableOn(),this.renderPreOrderCountDown())}renderPrefixText(){return this.prefixText?s("span",{class:"s-count-down-prefix-text"},this.prefixText):null}renderButton(){return this.withButton&&this.buttonText?s("salla-button",{color:"primary",size:"medium",href:this.buttonHref},this.buttonIcon?s("i",{class:this.buttonIcon}):null,s("span",null,this.buttonText)):null}renderContent(){return this.date?!this.isValidDate(this.date)||this.parseFailed?this.renderInvalidDate():this.preOrder?this.renderPreOrder():this.renderCountDown():null}render(){return s(i,{key:"16f2244e2e1b828cd80a186528726a089146acff",class:`s-count-down-wrapper ${this.preOrder&&this.isValidDate(this.date)?"s-count-down-pre-order":""} ${this.horizontal?"s-count-down-horizontal":""} ${this.withButton?"s-count-down-with-button":""} ${this.offerEnded?"s-count-down-ended":""}`},this.renderPrefixText(),this.renderContent(),this.offerEnded&&this.renderOfferEnded(),this.renderButton())}};e.style=".s-count-down-horizontal{background-color:rgba(0, 0, 0, 0.06);background-color:color-mix(in srgb, var(--color-primary) 10%, transparent)}";export{e as salla_count_down}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as s,h as t}from"./p-6ZT_-rrT.js";import{a as i}from"./p-CgtvEd63.js";import{a as e}from"./p-BedNk7k1.js";import{S as a}from"./p-8Tsmrwno.js";import{S as l}from"./p-0-eTJXSD.js";const o=class{constructor(t){s(this,t),this.defaultEvent="gifting:open",this.selectImageForYourGift=salla.lang.get("blocks.buy_as_gift.select_image_or_upload"),this.currentStep=1,this.showCalendar=!1,this.showGiftText=!1,this.currentLang="",this.parentClass="is-current-step-1",this.errors={},this.gift=void 0,this.selectedGiftTextOption=void 0,this.selectedCountryId=void 0,this.selectedCountryCode=void 0,this.loadingCities=!1,this.loadingRegions=!1,this.regions=[],this.selectedRegionId=void 0,this.isKSA=!1,this.step2Animated=!1,this.showTextArea=!1,this.selectedImage=void 0,this.uploadedImage=void 0,this.selectedText=void 0,this.hasError=!1,this.timeZone=null,this.receiverCountryCode=salla.config.get("store.scope.countries")?.[0]||salla.config.get("store.store_country")||"SA",this.hostId=`salla-gifting-${Math.random().toString(36).slice(2,10)}`,this.formSelector="form.product-form, form.form--product-options",salla.lang.onLoaded((()=>{this.selectImageOrUpload=salla.lang.get("blocks.buy_as_gift.select_image_or_upload"),this.selectImageForYourGift=salla.lang.get("blocks.buy_as_gift.select_image_for_your_gift"),this.sectionTitle=salla.lang.get("blocks.buy_as_gift.gift_the_one_you_love"),this.sectionSubtitle=salla.lang.get("blocks.buy_as_gift.gift_the_one_you_love_message"),this.sectionBtnText=salla.lang.get("blocks.buy_as_gift.send_as_a_gift"),this.giftDetails=salla.lang.get("blocks.buy_as_gift.gift_details"),this.selectGiftMessage=salla.lang.get("blocks.buy_as_gift.select_gift_message"),this.giftCustomText=salla.lang.get("blocks.buy_as_gift.gift_custom_text"),this.textId=salla.lang.get("blocks.buy_as_gift.text_id"),this.incorrectGiftText=salla.lang.get("blocks.buy_as_gift.incorrect_gift_text"),this.nextStep=salla.lang.get("blocks.buy_as_gift.next_step"),this.senderNameLabel=salla.lang.get("blocks.buy_as_gift.sender_name"),this.receiverNameFieldLabel=salla.lang.get("blocks.buy_as_gift.receiver_name"),this.receiverMobileFieldLabel=salla.lang.get("blocks.buy_as_gift.receiver_mobile"),this.receiverCountryFieldLabel=salla.lang.get("blocks.buy_as_gift.receiver_country"),this.ksa=salla.lang.get("pages.checkout.ksa"),this.selectCity=salla.lang.get("pages.checkout.select_city"),this.selectCountry=salla.lang.get("pages.checkout.select_country"),this.selectCityInfo=salla.lang.get("blocks.buy_as_gift.city_info"),this.receiverCityFieldLabel=salla.lang.get("blocks.buy_as_gift.receiver_city"),this.receiverRegionFieldLabel=salla.lang.get("blocks.buy_as_gift.receiver_region")||salla.lang.get("pages.checkout.region"),this.selectRegion=salla.lang.get("pages.checkout.select_region"),this.receiverEmailFieldLabel=salla.lang.get("blocks.buy_as_gift.receiver_email"),this.emailPlaceholder=salla.lang.get("common.elements.email_placeholder"),this.sendLater=salla.lang.get("blocks.buy_as_gift.send_later"),this.selectSendDateAndTime=salla.lang.get("blocks.buy_as_gift.select_send_date_and_time"),this.canNotEditOrderAfterSelectDate=salla.lang.get("blocks.buy_as_gift.can_not_edit_order_after_select_date"),this.sendGift=salla.lang.get("blocks.buy_as_gift.send_gift"),this.donationRequired=salla.lang.get("pages.products.donation_amount_required"),this.currentLang=salla.lang.locale})),salla.event.on(this.defaultEvent,(()=>{this.open()}))}isPhysical(){return this.physicalProducts||this.physical}componentDidLoad(){salla.event.product.onPriceUpdated((()=>{const s=document.querySelector(".s-quantity-input-input");this.quantity=s?.value}))}getFormDataFromForm(){if(!this.formSelector)return null;const s=document.querySelector(this.formSelector);return s?new FormData(s):null}mergeObjectToFormData(s,t,i){for(let e in s){if(!s.hasOwnProperty(e)||null==s[e])continue;const a=i?`${i}[${e}]`:e;"object"!=typeof s[e]||null===s[e]||s[e]instanceof File?t.set(a,s[e]):this.mergeObjectToFormData(s[e],t,a)}return t}async open(){if(salla.config.isGuest())return salla.api.auth.setAfterLoginEvent(this.defaultEvent),void salla.event.dispatch("login::open",{withoutReload:!0});await this.modal.open();const s=this.productId?()=>salla.product.getGiftProductDetails(this.productId):()=>salla.cart.getGiftCartDetails();return await salla.api.withoutNotifier(s).then((s=>{this.gift=s.data,this.senderName=this.gift.sender_name})).catch((s=>{this.hasError=!0,this.errorMessage=s.response?.data?.error?.message||s.response?.data})).finally((()=>this.modal.stopLoading()))}async close(){return this.modal.close()}async setWrapperHeight(s=1,t=250,i=0,e=0){let a=document.querySelector(`#${this.hostId} .gift-step-${s}`);const l=()=>{this.stepsWrapper.style.height=e?`${e}px`:a.offsetHeight+i+"px"};this.step2Animated&&2===s?requestAnimationFrame(l):setTimeout(l,t)}toggleCalendar(){this.showCalendar=!this.showCalendar,this.setWrapperHeight(2,150,0)}toggleGiftText(s){this.textSelect?.classList.remove("s-form-has-error");let t=s.target.children[s.target.selectedIndex].getAttribute("data-id"),i="custom"==t;this.showGiftText=i,t?(this.selectedGiftTextOption=t,this.selectedText=i?void 0:s.target.value,this.setWrapperHeight(1,150,5)):(this.textArea.value="",this.selectedText=void 0,this.selectedGiftTextOption=void 0,this.setWrapperHeight(1,150,-15))}async goToStep2(){return this.selectedGiftTextOption?"custom"!=this.selectedGiftTextOption||this.selectedText?(this.textSelect.classList.remove("s-form-has-error"),this.customTextArea.classList.remove("s-form-has-error"),this.setWrapperHeight(2,600,0),(new i.timeline).add({targets:this.step1Elems.querySelectorAll(`#${this.hostId} .anime-item`),opacity:[1,0],translateX:[0,50],delay:i.stagger(70),duration:1200}).add({targets:".gift-step-2",translateX:["-110%",0],opacity:[0,1]},"-=1800").add({targets:this.step2Elems.querySelectorAll(`#${this.hostId} .anime-item`),opacity:[0,1],translateX:[-50,0],delay:i.stagger(70),duration:1200,complete:()=>{this.step2Elems.querySelectorAll(`#${this.hostId} .anime-item`).forEach((s=>{s.classList.remove("opacity-0"),s.removeAttribute("style")})),this.step2Animated=!0}},"-=1200"),this.currentStep=2,void(this.parentClass=`is-current-step-${this.currentStep}`)):(this.textSelect.classList.remove("s-form-has-error"),void this.customTextArea.classList.add("s-form-has-error")):(this.textSelect.classList.add("s-form-has-error"),void this.customTextArea.classList.remove("s-form-has-error"))}goToStep1(s){s.preventDefault();let t=new i.timeline({autoplay:!1});t.add({targets:this.step2Elems.querySelectorAll(`#${this.hostId} .anime-item`),opacity:[1,0],translateX:[0,-50],delay:i.stagger(70),duration:1200}).add({targets:".gift-step-1",translateX:["110%",0],opacity:[0,1]},"-=1800").add({targets:this.step1Elems.querySelectorAll(`#${this.hostId} .anime-item`),opacity:[0,1],translateX:[50,0],delay:i.stagger(70),duration:1200,complete:()=>{this.step1Elems.querySelectorAll(`#${this.hostId} .anime-item`).forEach((s=>{s.classList.remove("opacity-0"),s.removeAttribute("style")}))}},"-=1200"),t.play(),this.step2Animated=!1,this.setWrapperHeight(1,600,0),this.currentStep=1,this.parentClass=`is-current-step-${this.currentStep}`}getFilepondPlaceholder(){return`<div class="s-gifting-filepond-placeholder"><span class="s-gifting-filepond-placeholder-icon"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>images</title>\n<path d="M22.667 29.333h-13.333c-3.676 0-6.667-2.991-6.667-6.667v-13.333c0-0.737-0.597-1.333-1.333-1.333s-1.333 0.596-1.333 1.333v13.333c0 5.145 4.187 9.333 9.333 9.333h13.333c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333zM22.667 5.333c-2.205 0-4 1.795-4 4s1.795 4 4 4 4-1.795 4-4-1.795-4-4-4zM22.667 10.667c-0.735 0-1.333-0.597-1.333-1.333s0.599-1.333 1.333-1.333 1.333 0.597 1.333 1.333-0.599 1.333-1.333 1.333zM25.333 0h-13.333c-3.676 0-6.667 2.991-6.667 6.667v13.333c0 1.055 0.268 2.040 0.707 2.927 0.039 0.099 0.088 0.188 0.151 0.277 1.137 2.053 3.301 3.463 5.809 3.463h13.333c3.676 0 6.667-2.991 6.667-6.667v-13.333c0-3.676-2.991-6.667-6.667-6.667zM12 24c-1.244 0-2.344-0.583-3.077-1.476l5.721-7.047 6.629 8.523zM29.333 20c0 2.205-1.795 4-4 4h-0.68l-8.933-11.485c-0.251-0.32-0.633-0.511-1.039-0.515h-0.015c-0.401 0-0.781 0.181-1.035 0.492l-5.632 6.935v-12.76c0-2.205 1.795-4 4-4h13.333c2.205 0 4 1.795 4 4z"></path>\n</svg>\n</span><p class="s-gifting-filepond-placeholder-text">${this.selectImageOrUpload?this.selectImageOrUpload:""}</p></div>`}setPreview(s){this.uploader?.classList.add("has-bg");var t=document.querySelector(`#${this.hostId}.filepond-bg`)?document.querySelector(`#${this.hostId} .filepond-bg`):document.createElement("div");t.classList.add("filepond-bg"),t.classList.remove("s-hidden"),t.style.backgroundImage="url('"+s.url+"')",this.uploader?.querySelector(".filepond--root")?.appendChild(t),this.uploadedImage=s.url,this.gift&&this.gift.gift_images.length&&this.setWrapperHeight(1,150,0)}removePreview(){this.uploader.classList.remove("has-bg");let s=document.querySelector(`#${this.hostId} .filepond-bg`);s.removeAttribute("style"),s.classList.add("s-hidden"),this.handleRemoveImage()}handleTextAreaChange(s){this.selectedText=s.target.value,this.customTextArea.classList.remove("s-form-has-error")}clearError(s){if(this.errors?.[s]){const{[s]:t,...i}=this.errors;this.errors=i}}handleSenderName(s){this.senderName=s.target.value,this.clearError("sender_name")}handleReceiverName(s){this.receiverName=s.target.value,this.clearError("receiver.name")}handleReceiverCity(s){this.receiverCity=s.target.value,this.clearError("receiver.city_id")}async handleCountryChange(s){const t=Number(s.target.value);this.selectedCountryId=t,this.clearError("receiver.country");const i=this.gift?.countries?.find((s=>s.id==t));if(this.selectedCountryCode=i?.country_code,this.isKSA="SA"===i?.country_code,this.regions=[],this.selectedRegionId=void 0,this.gift={...this.gift,cities:[]},this.receiverCity=void 0,!t||0===this.gift?.countries?.length)return this.selectedCountryCode=void 0,this.isKSA=!1,void this.setWrapperHeight(2,0,0);if(this.isKSA){this.loadingRegions=!0,this.setWrapperHeight(2,0,0);try{const s=await salla.api.request(`shipping/countries/${t}/regions`);s&&s.data&&(this.regions=s.data)}catch(s){console.error("Error fetching regions:",s)}finally{this.loadingRegions=!1,this.setWrapperHeight(2,0,0)}}else{this.loadingCities=!0,this.setWrapperHeight(2,0,0);try{const s=await salla.api.request(`shipping/cities?for_branch=0&country_id=${t}`);s&&s.data&&(this.gift={...this.gift,cities:s.data})}catch(s){console.error("Error fetching cities:",s)}finally{this.loadingCities=!1}}}async handleRegionChange(s){const t=Number(s.target.value);if(this.selectedRegionId=t,this.clearError("receiver.region"),this.gift={...this.gift,cities:[]},this.receiverCity=void 0,t){this.loadingCities=!0;try{const s=await salla.api.request(`shipping/cities?for_branch=0&country_id=${this.selectedCountryId}®ion_id=${t}`);s&&s.data&&(this.gift={...this.gift,cities:s.data})}catch(s){console.error("Error fetching cities:",s)}finally{this.loadingCities=!1,this.setWrapperHeight(2,0,0)}}}handleUploadImage(s){this.uploadedImage=s,this.gift&&this.gift.gift_images.length&&this.setWrapperHeight(1,150,0)}handleRemoveImage(){this.uploadedImage="",this.gift&&this.gift.gift_images.length&&this.setWrapperHeight(1,150,0)}handlePhoneInputChange(s){let t=s.detail;this.receiverMobile=t.number,this.receiverCountryCode=t.country_code,this.clearError("receiver.mobile")}handleDateTimePicker(s){this.deliveryDate=s.detail}getCalendarClasses(){return{"s-form-group":!0,"anime-item":!0,"s-gifting-calendar":!0,shown:this.showCalendar,hide:!this.showCalendar,"s-form-has-error":!!this.errors&&this.errors.deliver_at}}async submitForm(){const s=document.querySelector("#donating-amount")?.value;if(this.calendarFormGroup.classList.remove("s-form-has-error"),this.errors&&(this.errors={},this.setWrapperHeight(2,150,0)),this.showCalendar&&!this.deliveryDate)return void this.calendarFormGroup.classList.add("s-form-has-error");const t=[{key:"sender_name",value:this.senderName,label:this.senderNameLabel},{key:"receiver.name",value:this.receiverName,label:this.receiverNameFieldLabel},{key:"receiver.mobile",value:this.receiverMobile,label:this.receiverMobileFieldLabel},...this.isPhysical()?[{key:"receiver.country",value:this.selectedCountryId,label:this.receiverCountryFieldLabel},...this.isKSA?[{key:"receiver.region",value:this.selectedRegionId,label:this.receiverRegionFieldLabel}]:[],{key:"receiver.city_id",value:this.receiverCity,label:this.receiverCityFieldLabel}]:[]],i={};if(t.forEach((({key:s,value:t,label:e})=>{t||(i[s]=salla.lang.get("common.errors.field_required",{attribute:e}))})),Object.keys(i).length)return this.errors=i,void this.setWrapperHeight(2,150,0);const e={text:this.selectedText,sender_name:this.senderName,quantity:this.quantity,deliver_at:this.showCalendar?this.deliveryDate:null,image_url:this.uploadedImage??this.selectedImage,donation_amount:s||null,receiver:{name:this.receiverName,mobile_country_code:this.receiverCountryCode,mobile:this.receiverMobile,...this.isPhysical()&&this.selectedCountryCode?{country_code:this.selectedCountryCode}:{},...this.isPhysical()&&this.selectedRegionId?{region_id:this.selectedRegionId}:{},...this.receiverCity&&this.isPhysical()?{city_id:this.receiverCity}:{}},has_apple_pay:salla.helpers.hasApplePay()};let a;this.productId&&this.formSelector&&(a=this.getFormDataFromForm()||new FormData,a=this.mergeObjectToFormData(e,a));const l=this.productId?()=>salla.product.addProductGiftToCart(this.productId,a,!0):()=>salla.cart.addCartGiftToCart(e,!0);return await l().then((()=>this.modal.close())).catch((s=>{s.response&&422==s.response.status?this.errors=s.response.data.error.fields:console.log(s),this.setWrapperHeight(2,150,0)}))}step2ItemClass(s=""){const t="anime-item"+(this.step2Animated?"":" opacity-0");return s?`${s} ${t}`:t}generateClass(){return{"s-gifting-widget":!0,"s-gifting-widget-vertical":!!this.vertical,"s-gifting-widget-horizontal":!this.vertical}}async handleGiftButtonClick(){if(this.productId&&this.formSelector){const s=document.querySelector(this.formSelector);if(!s)return void console.error("SallaGifting:: Form not found in the document!");if(!(s instanceof HTMLFormElement))return void console.error("SallaGifting:: The specified selector does not correspond to a form tag!");if(!s.reportValidity())return console.error("SallaGifting:: Form is not valid!"),void salla.error(salla.lang.get("common.messages.required_fields"))}const s=document.querySelector(`salla-product-options[product-id="${this.productId}"]`);!s||await s.reportValidity()?this.open():salla.error(salla.lang.get("common.messages.required_fields"))}render(){return[t("div",{key:"f20cc2c84e987b34bb862f72a8f639894ed4150e"},t("salla-list-tile",{key:"c52aa5e975f9ed1707c3175fa66109f447749ee7",class:this.generateClass()},t("div",{key:"2bf7065f32132dde95dacfdea44e34c08cc4e61c",slot:"title"},this.vertical?t("span",{innerHTML:l}):"",t("h3",{key:"7a9a70b6841a708c322f5bb729e940e4da823261"},this.widgetTitle?this.widgetTitle:this.sectionTitle)),t("div",{key:"c346f2baa8e6a1adf9b0f89e9b50d236e65116cb",slot:"subtitle"},t("div",{key:"26c908af9687b0c77554054212f5c8251dc45bf3"},this.widgetSubtitle?this.widgetSubtitle:this.sectionSubtitle)),t("div",{key:"f91bf3811c383773425af74941a2067e2f62dbb7",slot:"action"},t("salla-button",{key:"0639c4b9cc4d81f300f6b087e1c10815b1610c75",color:"primary",fill:"outline",width:"wide",class:"s-gifting-widget-action",onClick:()=>this.handleGiftButtonClick()},t("slot",{key:"06567fa7406ae6502e8f3211ecab6161c4a7e397",name:"widget-btn-content"},t("div",{key:"f895900d17947b006f6aef4695b855eba4737ed2",class:"s-gifting-widget-action-content"},t("span",{key:"bd3170b8efa2a0c95f61718afd69e5473adae20a",innerHTML:l})," ",t("span",{key:"cdc3d1df35ad0e7334bc289f9fff2d312d709724"},this.sectionBtnText)))))),t("salla-modal",{key:"a98b913100edfa92156baeee766f6141818ebd8b",id:this.hostId,isLoading:!0,class:"s-gifting-modal",width:"sm",ref:s=>this.modal=s},t("div",{key:"6b438c581e600cbcfeb5260bae8371a1fbefa29c",slot:"loading"},t("div",{key:"ada9e9bb0355755eade9ff7846334cb5ae093e6f",class:"s-gifting-skeleton"},t("div",{key:"11d2e41b6acb933f5b006cc9f0b0b46470892c6a",class:"s-gifting-modal-header"},t("salla-skeleton",{key:"141be7d6aa83fed682f8ab6a3708597dbb4dba11",type:"circle",height:"5rem",width:"5rem"}),t("h2",{key:"65eba6244b5507397c8e50ef40f695e7eebe0b96",class:"s-gifting-modal-title"},t("div",{key:"0f2488d19d2de0a728377b9f475b70073f6f196a",class:"s-gifting-modal-badge-wrapper"},t("salla-skeleton",{key:"b648340418099246c8b83b308f116412fdb6cbc9",height:"15px",width:"150px"})))),t("div",{key:"8255e53b49f572ef3c4485cf7e84540dac019f89",class:"s-gifting-skeleton-content"},t("salla-skeleton",{key:"0b05db8e76a9a53032b1643d8c4e223b8b641e30",height:"10px",width:"150px"}),t("salla-skeleton",{key:"c585bf04433e46ce8e89d9bfc3402faf4cfbb21a",height:"230px"}),t("salla-skeleton",{key:"0c09063b73e3aecb6a1879cdc93b60a6bcb9b2cc",height:"10px",width:"150px"}),t("salla-skeleton",{key:"88f55e5ffded2f784002b44e49f3ab2d22a7c067",height:"30px"}),t("salla-skeleton",{key:"6e1edd3b031f051ec24149ec690d2e4f04f9c557",height:"40px"})))),t("slot",{key:"bff6a067b10a31c39f22e18c6bdf5a60f56ef116",name:"header"}),this.hasError?t("salla-placeholder",{alignment:"center"},t("span",{slot:"title"},this.errorMessage||salla.lang.get("common.errors.empty_results")),t("span",{slot:"description"}," ")):[t("div",{class:"s-gifting-modal-header"},t("span",{class:"s-gifting-modal-icon"},t("span",{innerHTML:l})),t("h2",{class:"s-gifting-modal-title"},t("div",{class:"s-gifting-modal-badge-wrapper"},t("div",{class:"s-gifting-modal-badge"},t("span",null,t("span",null,this.currentStep),"/2")),t("span",null,this.giftDetails)))),t("div",{class:"s-gifting-steps-wrapper "+this.parentClass,ref:s=>this.stepsWrapper=s},t("div",{class:"s-gifting-step-one gift-step-1",ref:s=>this.step1Elems=s},t("div",{class:"s-gifting-modal-uploader-title anime-item"},this.selectImageForYourGift),t("div",{class:"s-gifting-modal-uploader anime-item",ref:s=>this.uploader=s},t("span",{class:"s-gifting-remove-preview",onClick:()=>this.removePreview(),innerHTML:a}),this.selectImageOrUpload&&t("salla-file-upload",{"instant-upload":!0,name:"image_url",url:salla.url.api(salla.product.api.getUrl("giftImage")),onUploaded:s=>this.handleUploadImage(s.detail),labelIdle:this.getFilepondPlaceholder(),onRemoved:()=>this.handleRemoveImage()})),t("div",{class:"anime-item"},!this.uploadedImage&&this.gift&&this.gift.gift_images&&this.gift.gift_images.length>0?t("salla-slider",{id:"gifting-slider",loop:!1,"controls-outer":!0,class:"s-gifting-slider",type:"carousel"},t("div",{slot:"items"},this.gift&&this.gift.gift_images?this.gift?.gift_images.map((s=>t("a",{class:"s-gifting-clickable s-gifting-image",onClick:()=>this.setPreview(s)},t("img",{style:{width:"120px"},src:s.url,alt:`${s.id}`})))):"")):""),t("div",{class:"anime-item"},t("div",{class:"s-form-group s-gifting-selectText",ref:s=>this.textSelect=s},t("select",{id:"gift-text-selection",name:"gift-text-selection",class:"s-form-control s-gifting-select",onChange:s=>this.toggleGiftText(s)},t("option",{"data-id":null,selected:!0},this.selectGiftMessage),this.gift&&this.gift.gift_texts?this.gift?.gift_texts.map((s=>t("option",{"data-id":s.id,value:s.text,key:s.id},s.text))):"",t("option",{"data-id":"custom"},this.giftCustomText))),t("div",{class:this.showGiftText?"s-form-group s-gifting-textarea shown":"s-form-group s-gifting-textarea hide",ref:s=>this.customTextArea=s},t("label",{htmlFor:"gift-custom-text",class:"s-form-label"},this.giftCustomText),t("div",{class:"mt-1"},t("textarea",{onInput:s=>this.handleTextAreaChange(s),rows:4,ref:s=>this.textArea=s,name:"gift-custom-text",id:"gift-custom-text",class:"s-form-control"})))),t("div",{class:"anime-item"},t("salla-button",{color:"primary",width:"wide",onClick:()=>this.goToStep2()},t("span",null,this.nextStep)))),t("div",{class:"s-gifting-step-two gift-step-2",ref:s=>this.step2Elems=s},t("div",{class:this.step2ItemClass(this.errors?.sender_name?"s-form-group s-form-has-error":"s-form-group")},t("label",{htmlFor:"sender_name",class:"s-form-label"},this.senderNameLabel),t("input",{type:"text",class:"s-form-control",name:"sender_name",id:"sender_name",value:this.senderName,onInput:s=>this.handleSenderName(s),placeholder:""}),this.errors&&this.errors.sender_name?t("span",{class:"s-gifting-error"},this.errors.sender_name):""),t("div",{class:this.step2ItemClass(this.errors?.["receiver.name"]?"s-form-group s-form-has-error":"s-form-group")},t("label",{htmlFor:"receiver_name",class:"s-form-label"},this.receiverNameFieldLabel),t("input",{type:"text",class:"s-form-control",name:"receiver_name",id:"receiver_name",value:"",onInput:s=>this.handleReceiverName(s),placeholder:""}),this.errors&&this.errors["receiver.name"]?t("span",{class:"s-gifting-error"},this.errors["receiver.name"]):""),t("div",{class:this.step2ItemClass(this.errors?.["receiver.mobile"]?"s-form-group s-form-has-error":"s-form-group")},t("label",{class:"s-form-label"},this.receiverMobileFieldLabel),t("salla-tel-input",{class:"s-gifting-tel-input",phone:this.receiverMobile,countryCode:this.receiverCountryCode,onPhoneEntered:s=>this.handlePhoneInputChange(s)}),this.errors&&this.errors["receiver.mobile"]?t("span",{class:"s-gifting-error"},this.errors["receiver.mobile"]):""),this.isPhysical()&&t("div",{class:this.step2ItemClass(this.errors?.["receiver.country"]?"s-form-group s-form-has-error":"s-form-group")},t("label",{class:"s-form-label"},this.receiverCountryFieldLabel),t("select",{name:"country",class:"s-form-control",onChange:s=>this.handleCountryChange(s),required:!0},t("option",{value:""},this.selectCountry),this.gift?.countries?.map((s=>t("option",{value:s.id},s.name)))),this.errors&&this.errors["receiver.country"]?t("span",{class:"s-gifting-error"},this.errors["receiver.country"]):""),this.isPhysical()&&this.isKSA&&t("div",{class:this.step2ItemClass(this.errors?.["receiver.region"]?"s-form-group s-form-has-error":"s-form-group")},t("label",{class:"s-form-label"},this.receiverRegionFieldLabel),t("select",{name:"region",class:"s-form-control",onChange:s=>this.handleRegionChange(s),disabled:this.loadingRegions},t("option",{value:"",selected:!0},this.loadingRegions?salla.lang.get("common.elements.loading"):this.selectRegion),this.regions?.map((s=>t("option",{value:s.id},s.name)))),this.errors&&this.errors["receiver.region"]?t("span",{class:"s-gifting-error"},this.errors["receiver.region"]):""),this.isPhysical()&&t("div",{class:this.step2ItemClass(this.errors?.["receiver.city_id"]?"s-form-group s-form-has-error":"s-form-group")},t("label",{class:"s-form-label"},this.receiverCityFieldLabel),t("select",{name:"city","aria-label":salla.lang.get("blocks.buy_as_gift.select_city"),class:"s-form-control",onChange:s=>this.handleReceiverCity(s),disabled:this.loadingCities||this.isKSA&&!this.selectedRegionId},t("option",{value:"",selected:!0},this.loadingCities?salla.lang.get("common.elements.loading"):this.selectCity),this.gift?.cities?.map((s=>t("option",{value:s.id},s.name)))),this.errors&&this.errors["receiver.city_id"]?t("span",{class:"s-gifting-error"},this.errors["receiver.city_id"]):""),this.isPhysical()&&t("div",{class:this.step2ItemClass("s-gifting-info")},t("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>alert</title>\n<path d="M16 13.333c-0.736 0-1.333 0.597-1.333 1.333v8c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-8c0-0.736-0.597-1.333-1.333-1.333zM16 9.327c-0.736 0-1.333 0.604-1.333 1.34s0.597 1.333 1.333 1.333 1.333-0.597 1.333-1.333v-0.013c0-0.736-0.597-1.327-1.333-1.327zM27.313 4.687c-6.237-6.237-16.389-6.239-22.628 0-6.237 6.239-6.237 16.389 0 22.628 3.119 3.119 7.216 4.679 11.313 4.679s8.195-1.559 11.313-4.679c6.24-6.239 6.24-16.391 0.001-22.628zM25.428 25.428c-5.199 5.197-13.657 5.197-18.857 0-5.197-5.199-5.197-13.659 0-18.857 5.199-5.197 13.659-5.197 18.857 0 5.199 5.2 5.199 13.659 0 18.857z"></path>\n</svg>\n'}),t("span",null,this.selectCityInfo)),!this.isPhysical()&&t("div",{class:this.step2ItemClass()},t("label",{class:"s-gifting-schedule s-gifting-clickable",htmlFor:`schedule-${this.hostId}`},t("input",{type:"checkbox",name:"schedule",id:`schedule-${this.hostId}`,onChange:()=>this.toggleCalendar(),class:"s-checkbox"}),t("span",{class:"s-form-label"}," ",this.sendLater," "))),t("div",{class:this.getCalendarClasses(),ref:s=>this.calendarFormGroup=s},t("label",{class:"s-form-label"},this.selectSendDateAndTime),t("salla-datetime-picker",{value:this.deliveryDate,placeholder:this.selectSendDateAndTime,"enable-time":!0,"date-format":"Y-m-d h:i K",onPicked:s=>this.handleDateTimePicker(s)}),t("span",{class:"s-gifting-calendar-hint"},this.canNotEditOrderAfterSelectDate)),t("div",{class:this.step2ItemClass("s-gifting-step-two-footer")},t("a",{href:"#!",innerHTML:e,onClick:s=>this.goToStep1(s)}),t("salla-button",{onClick:()=>this.submitForm(),color:"primary",width:"wide"},t("span",null,this.sendGift)))))],t("slot",{key:"4cad8b174ab427e6f75b77357efc20e54d791ba4",name:"footer"})))]}};o.style=".s-gifting-steps-wrapper{transition:0.2s cubic-bezier(0.55, 0, 0.1, 1) 0s}.s-gifting-select{background-image:url(\"data:image/svg+xml;utf8,<svg version='1.1' fill='gray' xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><title>keyboard_arrow_down</title><path d='M9.875 11.104l6.125 6.125 6.125-6.125 1.875 1.875-8 8-8-8z'></path></svg>\");background-size:24px;background-repeat:no-repeat;background-position:99%;appearance:none}[dir=rtl] .s-gifting-select{background-position:5px}.s-gifting-widget-vertical .s-list-tile-item [slot=title]{display:flex;align-items:center;gap:1.5rem}.s-gifting-widget-vertical .s-list-tile-item-content{width:100%}";export{o as salla_gifting}
|
|
4
|
+
import{r as s,h as t}from"./p-BJrHu3Q4.js";import{a as i}from"./p-CgtvEd63.js";import{a as e}from"./p-BedNk7k1.js";import{S as a}from"./p-8Tsmrwno.js";import{S as l}from"./p-0-eTJXSD.js";const o=class{constructor(t){s(this,t),this.defaultEvent="gifting:open",this.selectImageForYourGift=salla.lang.get("blocks.buy_as_gift.select_image_or_upload"),this.currentStep=1,this.showCalendar=!1,this.showGiftText=!1,this.currentLang="",this.parentClass="is-current-step-1",this.errors={},this.gift=void 0,this.selectedGiftTextOption=void 0,this.selectedCountryId=void 0,this.selectedCountryCode=void 0,this.loadingCities=!1,this.loadingRegions=!1,this.regions=[],this.selectedRegionId=void 0,this.isKSA=!1,this.step2Animated=!1,this.showTextArea=!1,this.selectedImage=void 0,this.uploadedImage=void 0,this.selectedText=void 0,this.hasError=!1,this.timeZone=null,this.receiverCountryCode=salla.config.get("store.scope.countries")?.[0]||salla.config.get("store.store_country")||"SA",this.hostId=`salla-gifting-${Math.random().toString(36).slice(2,10)}`,this.formSelector="form.product-form, form.form--product-options",salla.lang.onLoaded((()=>{this.selectImageOrUpload=salla.lang.get("blocks.buy_as_gift.select_image_or_upload"),this.selectImageForYourGift=salla.lang.get("blocks.buy_as_gift.select_image_for_your_gift"),this.sectionTitle=salla.lang.get("blocks.buy_as_gift.gift_the_one_you_love"),this.sectionSubtitle=salla.lang.get("blocks.buy_as_gift.gift_the_one_you_love_message"),this.sectionBtnText=salla.lang.get("blocks.buy_as_gift.send_as_a_gift"),this.giftDetails=salla.lang.get("blocks.buy_as_gift.gift_details"),this.selectGiftMessage=salla.lang.get("blocks.buy_as_gift.select_gift_message"),this.giftCustomText=salla.lang.get("blocks.buy_as_gift.gift_custom_text"),this.textId=salla.lang.get("blocks.buy_as_gift.text_id"),this.incorrectGiftText=salla.lang.get("blocks.buy_as_gift.incorrect_gift_text"),this.nextStep=salla.lang.get("blocks.buy_as_gift.next_step"),this.senderNameLabel=salla.lang.get("blocks.buy_as_gift.sender_name"),this.receiverNameFieldLabel=salla.lang.get("blocks.buy_as_gift.receiver_name"),this.receiverMobileFieldLabel=salla.lang.get("blocks.buy_as_gift.receiver_mobile"),this.receiverCountryFieldLabel=salla.lang.get("blocks.buy_as_gift.receiver_country"),this.ksa=salla.lang.get("pages.checkout.ksa"),this.selectCity=salla.lang.get("pages.checkout.select_city"),this.selectCountry=salla.lang.get("pages.checkout.select_country"),this.selectCityInfo=salla.lang.get("blocks.buy_as_gift.city_info"),this.receiverCityFieldLabel=salla.lang.get("blocks.buy_as_gift.receiver_city"),this.receiverRegionFieldLabel=salla.lang.get("blocks.buy_as_gift.receiver_region")||salla.lang.get("pages.checkout.region"),this.selectRegion=salla.lang.get("pages.checkout.select_region"),this.receiverEmailFieldLabel=salla.lang.get("blocks.buy_as_gift.receiver_email"),this.emailPlaceholder=salla.lang.get("common.elements.email_placeholder"),this.sendLater=salla.lang.get("blocks.buy_as_gift.send_later"),this.selectSendDateAndTime=salla.lang.get("blocks.buy_as_gift.select_send_date_and_time"),this.canNotEditOrderAfterSelectDate=salla.lang.get("blocks.buy_as_gift.can_not_edit_order_after_select_date"),this.sendGift=salla.lang.get("blocks.buy_as_gift.send_gift"),this.donationRequired=salla.lang.get("pages.products.donation_amount_required"),this.currentLang=salla.lang.locale})),salla.event.on(this.defaultEvent,(()=>{this.open()}))}isPhysical(){return this.physicalProducts||this.physical}componentDidLoad(){salla.event.product.onPriceUpdated((()=>{const s=document.querySelector(".s-quantity-input-input");this.quantity=s?.value}))}getFormDataFromForm(){if(!this.formSelector)return null;const s=document.querySelector(this.formSelector);return s?new FormData(s):null}mergeObjectToFormData(s,t,i){for(let e in s){if(!s.hasOwnProperty(e)||null==s[e])continue;const a=i?`${i}[${e}]`:e;"object"!=typeof s[e]||null===s[e]||s[e]instanceof File?t.set(a,s[e]):this.mergeObjectToFormData(s[e],t,a)}return t}async open(){if(salla.config.isGuest())return salla.api.auth.setAfterLoginEvent(this.defaultEvent),void salla.event.dispatch("login::open",{withoutReload:!0});await this.modal.open();const s=this.productId?()=>salla.product.getGiftProductDetails(this.productId):()=>salla.cart.getGiftCartDetails();return await salla.api.withoutNotifier(s).then((s=>{this.gift=s.data,this.senderName=this.gift.sender_name})).catch((s=>{this.hasError=!0,this.errorMessage=s.response?.data?.error?.message||s.response?.data})).finally((()=>this.modal.stopLoading()))}async close(){return this.modal.close()}async setWrapperHeight(s=1,t=250,i=0,e=0){let a=document.querySelector(`#${this.hostId} .gift-step-${s}`);const l=()=>{this.stepsWrapper.style.height=e?`${e}px`:a.offsetHeight+i+"px"};this.step2Animated&&2===s?requestAnimationFrame(l):setTimeout(l,t)}toggleCalendar(){this.showCalendar=!this.showCalendar,this.setWrapperHeight(2,150,0)}toggleGiftText(s){this.textSelect?.classList.remove("s-form-has-error");let t=s.target.children[s.target.selectedIndex].getAttribute("data-id"),i="custom"==t;this.showGiftText=i,t?(this.selectedGiftTextOption=t,this.selectedText=i?void 0:s.target.value,this.setWrapperHeight(1,150,5)):(this.textArea.value="",this.selectedText=void 0,this.selectedGiftTextOption=void 0,this.setWrapperHeight(1,150,-15))}async goToStep2(){return this.selectedGiftTextOption?"custom"!=this.selectedGiftTextOption||this.selectedText?(this.textSelect.classList.remove("s-form-has-error"),this.customTextArea.classList.remove("s-form-has-error"),this.setWrapperHeight(2,600,0),(new i.timeline).add({targets:this.step1Elems.querySelectorAll(`#${this.hostId} .anime-item`),opacity:[1,0],translateX:[0,50],delay:i.stagger(70),duration:1200}).add({targets:".gift-step-2",translateX:["-110%",0],opacity:[0,1]},"-=1800").add({targets:this.step2Elems.querySelectorAll(`#${this.hostId} .anime-item`),opacity:[0,1],translateX:[-50,0],delay:i.stagger(70),duration:1200,complete:()=>{this.step2Elems.querySelectorAll(`#${this.hostId} .anime-item`).forEach((s=>{s.classList.remove("opacity-0"),s.removeAttribute("style")})),this.step2Animated=!0}},"-=1200"),this.currentStep=2,void(this.parentClass=`is-current-step-${this.currentStep}`)):(this.textSelect.classList.remove("s-form-has-error"),void this.customTextArea.classList.add("s-form-has-error")):(this.textSelect.classList.add("s-form-has-error"),void this.customTextArea.classList.remove("s-form-has-error"))}goToStep1(s){s.preventDefault();let t=new i.timeline({autoplay:!1});t.add({targets:this.step2Elems.querySelectorAll(`#${this.hostId} .anime-item`),opacity:[1,0],translateX:[0,-50],delay:i.stagger(70),duration:1200}).add({targets:".gift-step-1",translateX:["110%",0],opacity:[0,1]},"-=1800").add({targets:this.step1Elems.querySelectorAll(`#${this.hostId} .anime-item`),opacity:[0,1],translateX:[50,0],delay:i.stagger(70),duration:1200,complete:()=>{this.step1Elems.querySelectorAll(`#${this.hostId} .anime-item`).forEach((s=>{s.classList.remove("opacity-0"),s.removeAttribute("style")}))}},"-=1200"),t.play(),this.step2Animated=!1,this.setWrapperHeight(1,600,0),this.currentStep=1,this.parentClass=`is-current-step-${this.currentStep}`}getFilepondPlaceholder(){return`<div class="s-gifting-filepond-placeholder"><span class="s-gifting-filepond-placeholder-icon"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>images</title>\n<path d="M22.667 29.333h-13.333c-3.676 0-6.667-2.991-6.667-6.667v-13.333c0-0.737-0.597-1.333-1.333-1.333s-1.333 0.596-1.333 1.333v13.333c0 5.145 4.187 9.333 9.333 9.333h13.333c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333zM22.667 5.333c-2.205 0-4 1.795-4 4s1.795 4 4 4 4-1.795 4-4-1.795-4-4-4zM22.667 10.667c-0.735 0-1.333-0.597-1.333-1.333s0.599-1.333 1.333-1.333 1.333 0.597 1.333 1.333-0.599 1.333-1.333 1.333zM25.333 0h-13.333c-3.676 0-6.667 2.991-6.667 6.667v13.333c0 1.055 0.268 2.040 0.707 2.927 0.039 0.099 0.088 0.188 0.151 0.277 1.137 2.053 3.301 3.463 5.809 3.463h13.333c3.676 0 6.667-2.991 6.667-6.667v-13.333c0-3.676-2.991-6.667-6.667-6.667zM12 24c-1.244 0-2.344-0.583-3.077-1.476l5.721-7.047 6.629 8.523zM29.333 20c0 2.205-1.795 4-4 4h-0.68l-8.933-11.485c-0.251-0.32-0.633-0.511-1.039-0.515h-0.015c-0.401 0-0.781 0.181-1.035 0.492l-5.632 6.935v-12.76c0-2.205 1.795-4 4-4h13.333c2.205 0 4 1.795 4 4z"></path>\n</svg>\n</span><p class="s-gifting-filepond-placeholder-text">${this.selectImageOrUpload?this.selectImageOrUpload:""}</p></div>`}setPreview(s){this.uploader?.classList.add("has-bg");var t=document.querySelector(`#${this.hostId}.filepond-bg`)?document.querySelector(`#${this.hostId} .filepond-bg`):document.createElement("div");t.classList.add("filepond-bg"),t.classList.remove("s-hidden"),t.style.backgroundImage="url('"+s.url+"')",this.uploader?.querySelector(".filepond--root")?.appendChild(t),this.uploadedImage=s.url,this.gift&&this.gift.gift_images.length&&this.setWrapperHeight(1,150,0)}removePreview(){this.uploader.classList.remove("has-bg");let s=document.querySelector(`#${this.hostId} .filepond-bg`);s.removeAttribute("style"),s.classList.add("s-hidden"),this.handleRemoveImage()}handleTextAreaChange(s){this.selectedText=s.target.value,this.customTextArea.classList.remove("s-form-has-error")}clearError(s){if(this.errors?.[s]){const{[s]:t,...i}=this.errors;this.errors=i}}handleSenderName(s){this.senderName=s.target.value,this.clearError("sender_name")}handleReceiverName(s){this.receiverName=s.target.value,this.clearError("receiver.name")}handleReceiverCity(s){this.receiverCity=s.target.value,this.clearError("receiver.city_id")}async handleCountryChange(s){const t=Number(s.target.value);this.selectedCountryId=t,this.clearError("receiver.country");const i=this.gift?.countries?.find((s=>s.id==t));if(this.selectedCountryCode=i?.country_code,this.isKSA="SA"===i?.country_code,this.regions=[],this.selectedRegionId=void 0,this.gift={...this.gift,cities:[]},this.receiverCity=void 0,!t||0===this.gift?.countries?.length)return this.selectedCountryCode=void 0,this.isKSA=!1,void this.setWrapperHeight(2,0,0);if(this.isKSA){this.loadingRegions=!0,this.setWrapperHeight(2,0,0);try{const s=await salla.api.request(`shipping/countries/${t}/regions`);s&&s.data&&(this.regions=s.data)}catch(s){console.error("Error fetching regions:",s)}finally{this.loadingRegions=!1,this.setWrapperHeight(2,0,0)}}else{this.loadingCities=!0,this.setWrapperHeight(2,0,0);try{const s=await salla.api.request(`shipping/cities?for_branch=0&country_id=${t}`);s&&s.data&&(this.gift={...this.gift,cities:s.data})}catch(s){console.error("Error fetching cities:",s)}finally{this.loadingCities=!1}}}async handleRegionChange(s){const t=Number(s.target.value);if(this.selectedRegionId=t,this.clearError("receiver.region"),this.gift={...this.gift,cities:[]},this.receiverCity=void 0,t){this.loadingCities=!0;try{const s=await salla.api.request(`shipping/cities?for_branch=0&country_id=${this.selectedCountryId}®ion_id=${t}`);s&&s.data&&(this.gift={...this.gift,cities:s.data})}catch(s){console.error("Error fetching cities:",s)}finally{this.loadingCities=!1,this.setWrapperHeight(2,0,0)}}}handleUploadImage(s){this.uploadedImage=s,this.gift&&this.gift.gift_images.length&&this.setWrapperHeight(1,150,0)}handleRemoveImage(){this.uploadedImage="",this.gift&&this.gift.gift_images.length&&this.setWrapperHeight(1,150,0)}handlePhoneInputChange(s){let t=s.detail;this.receiverMobile=t.number,this.receiverCountryCode=t.country_code,this.clearError("receiver.mobile")}handleDateTimePicker(s){this.deliveryDate=s.detail}getCalendarClasses(){return{"s-form-group":!0,"anime-item":!0,"s-gifting-calendar":!0,shown:this.showCalendar,hide:!this.showCalendar,"s-form-has-error":!!this.errors&&this.errors.deliver_at}}async submitForm(){const s=document.querySelector("#donating-amount")?.value;if(this.calendarFormGroup.classList.remove("s-form-has-error"),this.errors&&(this.errors={},this.setWrapperHeight(2,150,0)),this.showCalendar&&!this.deliveryDate)return void this.calendarFormGroup.classList.add("s-form-has-error");const t=[{key:"sender_name",value:this.senderName,label:this.senderNameLabel},{key:"receiver.name",value:this.receiverName,label:this.receiverNameFieldLabel},{key:"receiver.mobile",value:this.receiverMobile,label:this.receiverMobileFieldLabel},...this.isPhysical()?[{key:"receiver.country",value:this.selectedCountryId,label:this.receiverCountryFieldLabel},...this.isKSA?[{key:"receiver.region",value:this.selectedRegionId,label:this.receiverRegionFieldLabel}]:[],{key:"receiver.city_id",value:this.receiverCity,label:this.receiverCityFieldLabel}]:[]],i={};if(t.forEach((({key:s,value:t,label:e})=>{t||(i[s]=salla.lang.get("common.errors.field_required",{attribute:e}))})),Object.keys(i).length)return this.errors=i,void this.setWrapperHeight(2,150,0);const e={text:this.selectedText,sender_name:this.senderName,quantity:this.quantity,deliver_at:this.showCalendar?this.deliveryDate:null,image_url:this.uploadedImage??this.selectedImage,donation_amount:s||null,receiver:{name:this.receiverName,mobile_country_code:this.receiverCountryCode,mobile:this.receiverMobile,...this.isPhysical()&&this.selectedCountryCode?{country_code:this.selectedCountryCode}:{},...this.isPhysical()&&this.selectedRegionId?{region_id:this.selectedRegionId}:{},...this.receiverCity&&this.isPhysical()?{city_id:this.receiverCity}:{}},has_apple_pay:salla.helpers.hasApplePay()};let a;this.productId&&this.formSelector&&(a=this.getFormDataFromForm()||new FormData,a=this.mergeObjectToFormData(e,a));const l=this.productId?()=>salla.product.addProductGiftToCart(this.productId,a,!0):()=>salla.cart.addCartGiftToCart(e,!0);return await l().then((()=>this.modal.close())).catch((s=>{s.response&&422==s.response.status?this.errors=s.response.data.error.fields:console.log(s),this.setWrapperHeight(2,150,0)}))}step2ItemClass(s=""){const t="anime-item"+(this.step2Animated?"":" opacity-0");return s?`${s} ${t}`:t}generateClass(){return{"s-gifting-widget":!0,"s-gifting-widget-vertical":!!this.vertical,"s-gifting-widget-horizontal":!this.vertical}}async handleGiftButtonClick(){if(this.productId&&this.formSelector){const s=document.querySelector(this.formSelector);if(!s)return void console.error("SallaGifting:: Form not found in the document!");if(!(s instanceof HTMLFormElement))return void console.error("SallaGifting:: The specified selector does not correspond to a form tag!");if(!s.reportValidity())return console.error("SallaGifting:: Form is not valid!"),void salla.error(salla.lang.get("common.messages.required_fields"))}const s=document.querySelector(`salla-product-options[product-id="${this.productId}"]`);!s||await s.reportValidity()?this.open():salla.error(salla.lang.get("common.messages.required_fields"))}render(){return[t("div",{key:"f20cc2c84e987b34bb862f72a8f639894ed4150e"},t("salla-list-tile",{key:"c52aa5e975f9ed1707c3175fa66109f447749ee7",class:this.generateClass()},t("div",{key:"2bf7065f32132dde95dacfdea44e34c08cc4e61c",slot:"title"},this.vertical?t("span",{innerHTML:l}):"",t("h3",{key:"7a9a70b6841a708c322f5bb729e940e4da823261"},this.widgetTitle?this.widgetTitle:this.sectionTitle)),t("div",{key:"c346f2baa8e6a1adf9b0f89e9b50d236e65116cb",slot:"subtitle"},t("div",{key:"26c908af9687b0c77554054212f5c8251dc45bf3"},this.widgetSubtitle?this.widgetSubtitle:this.sectionSubtitle)),t("div",{key:"f91bf3811c383773425af74941a2067e2f62dbb7",slot:"action"},t("salla-button",{key:"0639c4b9cc4d81f300f6b087e1c10815b1610c75",color:"primary",fill:"outline",width:"wide",class:"s-gifting-widget-action",onClick:()=>this.handleGiftButtonClick()},t("slot",{key:"06567fa7406ae6502e8f3211ecab6161c4a7e397",name:"widget-btn-content"},t("div",{key:"f895900d17947b006f6aef4695b855eba4737ed2",class:"s-gifting-widget-action-content"},t("span",{key:"bd3170b8efa2a0c95f61718afd69e5473adae20a",innerHTML:l})," ",t("span",{key:"cdc3d1df35ad0e7334bc289f9fff2d312d709724"},this.sectionBtnText)))))),t("salla-modal",{key:"a98b913100edfa92156baeee766f6141818ebd8b",id:this.hostId,isLoading:!0,class:"s-gifting-modal",width:"sm",ref:s=>this.modal=s},t("div",{key:"6b438c581e600cbcfeb5260bae8371a1fbefa29c",slot:"loading"},t("div",{key:"ada9e9bb0355755eade9ff7846334cb5ae093e6f",class:"s-gifting-skeleton"},t("div",{key:"11d2e41b6acb933f5b006cc9f0b0b46470892c6a",class:"s-gifting-modal-header"},t("salla-skeleton",{key:"141be7d6aa83fed682f8ab6a3708597dbb4dba11",type:"circle",height:"5rem",width:"5rem"}),t("h2",{key:"65eba6244b5507397c8e50ef40f695e7eebe0b96",class:"s-gifting-modal-title"},t("div",{key:"0f2488d19d2de0a728377b9f475b70073f6f196a",class:"s-gifting-modal-badge-wrapper"},t("salla-skeleton",{key:"b648340418099246c8b83b308f116412fdb6cbc9",height:"15px",width:"150px"})))),t("div",{key:"8255e53b49f572ef3c4485cf7e84540dac019f89",class:"s-gifting-skeleton-content"},t("salla-skeleton",{key:"0b05db8e76a9a53032b1643d8c4e223b8b641e30",height:"10px",width:"150px"}),t("salla-skeleton",{key:"c585bf04433e46ce8e89d9bfc3402faf4cfbb21a",height:"230px"}),t("salla-skeleton",{key:"0c09063b73e3aecb6a1879cdc93b60a6bcb9b2cc",height:"10px",width:"150px"}),t("salla-skeleton",{key:"88f55e5ffded2f784002b44e49f3ab2d22a7c067",height:"30px"}),t("salla-skeleton",{key:"6e1edd3b031f051ec24149ec690d2e4f04f9c557",height:"40px"})))),t("slot",{key:"bff6a067b10a31c39f22e18c6bdf5a60f56ef116",name:"header"}),this.hasError?t("salla-placeholder",{alignment:"center"},t("span",{slot:"title"},this.errorMessage||salla.lang.get("common.errors.empty_results")),t("span",{slot:"description"}," ")):[t("div",{class:"s-gifting-modal-header"},t("span",{class:"s-gifting-modal-icon"},t("span",{innerHTML:l})),t("h2",{class:"s-gifting-modal-title"},t("div",{class:"s-gifting-modal-badge-wrapper"},t("div",{class:"s-gifting-modal-badge"},t("span",null,t("span",null,this.currentStep),"/2")),t("span",null,this.giftDetails)))),t("div",{class:"s-gifting-steps-wrapper "+this.parentClass,ref:s=>this.stepsWrapper=s},t("div",{class:"s-gifting-step-one gift-step-1",ref:s=>this.step1Elems=s},t("div",{class:"s-gifting-modal-uploader-title anime-item"},this.selectImageForYourGift),t("div",{class:"s-gifting-modal-uploader anime-item",ref:s=>this.uploader=s},t("span",{class:"s-gifting-remove-preview",onClick:()=>this.removePreview(),innerHTML:a}),this.selectImageOrUpload&&t("salla-file-upload",{"instant-upload":!0,name:"image_url",url:salla.url.api(salla.product.api.getUrl("giftImage")),onUploaded:s=>this.handleUploadImage(s.detail),labelIdle:this.getFilepondPlaceholder(),onRemoved:()=>this.handleRemoveImage()})),t("div",{class:"anime-item"},!this.uploadedImage&&this.gift&&this.gift.gift_images&&this.gift.gift_images.length>0?t("salla-slider",{id:"gifting-slider",loop:!1,"controls-outer":!0,class:"s-gifting-slider",type:"carousel"},t("div",{slot:"items"},this.gift&&this.gift.gift_images?this.gift?.gift_images.map((s=>t("a",{class:"s-gifting-clickable s-gifting-image",onClick:()=>this.setPreview(s)},t("img",{style:{width:"120px"},src:s.url,alt:`${s.id}`})))):"")):""),t("div",{class:"anime-item"},t("div",{class:"s-form-group s-gifting-selectText",ref:s=>this.textSelect=s},t("select",{id:"gift-text-selection",name:"gift-text-selection",class:"s-form-control s-gifting-select",onChange:s=>this.toggleGiftText(s)},t("option",{"data-id":null,selected:!0},this.selectGiftMessage),this.gift&&this.gift.gift_texts?this.gift?.gift_texts.map((s=>t("option",{"data-id":s.id,value:s.text,key:s.id},s.text))):"",t("option",{"data-id":"custom"},this.giftCustomText))),t("div",{class:this.showGiftText?"s-form-group s-gifting-textarea shown":"s-form-group s-gifting-textarea hide",ref:s=>this.customTextArea=s},t("label",{htmlFor:"gift-custom-text",class:"s-form-label"},this.giftCustomText),t("div",{class:"mt-1"},t("textarea",{onInput:s=>this.handleTextAreaChange(s),rows:4,ref:s=>this.textArea=s,name:"gift-custom-text",id:"gift-custom-text",class:"s-form-control"})))),t("div",{class:"anime-item"},t("salla-button",{color:"primary",width:"wide",onClick:()=>this.goToStep2()},t("span",null,this.nextStep)))),t("div",{class:"s-gifting-step-two gift-step-2",ref:s=>this.step2Elems=s},t("div",{class:this.step2ItemClass(this.errors?.sender_name?"s-form-group s-form-has-error":"s-form-group")},t("label",{htmlFor:"sender_name",class:"s-form-label"},this.senderNameLabel),t("input",{type:"text",class:"s-form-control",name:"sender_name",id:"sender_name",value:this.senderName,onInput:s=>this.handleSenderName(s),placeholder:""}),this.errors&&this.errors.sender_name?t("span",{class:"s-gifting-error"},this.errors.sender_name):""),t("div",{class:this.step2ItemClass(this.errors?.["receiver.name"]?"s-form-group s-form-has-error":"s-form-group")},t("label",{htmlFor:"receiver_name",class:"s-form-label"},this.receiverNameFieldLabel),t("input",{type:"text",class:"s-form-control",name:"receiver_name",id:"receiver_name",value:"",onInput:s=>this.handleReceiverName(s),placeholder:""}),this.errors&&this.errors["receiver.name"]?t("span",{class:"s-gifting-error"},this.errors["receiver.name"]):""),t("div",{class:this.step2ItemClass(this.errors?.["receiver.mobile"]?"s-form-group s-form-has-error":"s-form-group")},t("label",{class:"s-form-label"},this.receiverMobileFieldLabel),t("salla-tel-input",{class:"s-gifting-tel-input",phone:this.receiverMobile,countryCode:this.receiverCountryCode,onPhoneEntered:s=>this.handlePhoneInputChange(s)}),this.errors&&this.errors["receiver.mobile"]?t("span",{class:"s-gifting-error"},this.errors["receiver.mobile"]):""),this.isPhysical()&&t("div",{class:this.step2ItemClass(this.errors?.["receiver.country"]?"s-form-group s-form-has-error":"s-form-group")},t("label",{class:"s-form-label"},this.receiverCountryFieldLabel),t("select",{name:"country",class:"s-form-control",onChange:s=>this.handleCountryChange(s),required:!0},t("option",{value:""},this.selectCountry),this.gift?.countries?.map((s=>t("option",{value:s.id},s.name)))),this.errors&&this.errors["receiver.country"]?t("span",{class:"s-gifting-error"},this.errors["receiver.country"]):""),this.isPhysical()&&this.isKSA&&t("div",{class:this.step2ItemClass(this.errors?.["receiver.region"]?"s-form-group s-form-has-error":"s-form-group")},t("label",{class:"s-form-label"},this.receiverRegionFieldLabel),t("select",{name:"region",class:"s-form-control",onChange:s=>this.handleRegionChange(s),disabled:this.loadingRegions},t("option",{value:"",selected:!0},this.loadingRegions?salla.lang.get("common.elements.loading"):this.selectRegion),this.regions?.map((s=>t("option",{value:s.id},s.name)))),this.errors&&this.errors["receiver.region"]?t("span",{class:"s-gifting-error"},this.errors["receiver.region"]):""),this.isPhysical()&&t("div",{class:this.step2ItemClass(this.errors?.["receiver.city_id"]?"s-form-group s-form-has-error":"s-form-group")},t("label",{class:"s-form-label"},this.receiverCityFieldLabel),t("select",{name:"city","aria-label":salla.lang.get("blocks.buy_as_gift.select_city"),class:"s-form-control",onChange:s=>this.handleReceiverCity(s),disabled:this.loadingCities||this.isKSA&&!this.selectedRegionId},t("option",{value:"",selected:!0},this.loadingCities?salla.lang.get("common.elements.loading"):this.selectCity),this.gift?.cities?.map((s=>t("option",{value:s.id},s.name)))),this.errors&&this.errors["receiver.city_id"]?t("span",{class:"s-gifting-error"},this.errors["receiver.city_id"]):""),this.isPhysical()&&t("div",{class:this.step2ItemClass("s-gifting-info")},t("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>alert</title>\n<path d="M16 13.333c-0.736 0-1.333 0.597-1.333 1.333v8c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-8c0-0.736-0.597-1.333-1.333-1.333zM16 9.327c-0.736 0-1.333 0.604-1.333 1.34s0.597 1.333 1.333 1.333 1.333-0.597 1.333-1.333v-0.013c0-0.736-0.597-1.327-1.333-1.327zM27.313 4.687c-6.237-6.237-16.389-6.239-22.628 0-6.237 6.239-6.237 16.389 0 22.628 3.119 3.119 7.216 4.679 11.313 4.679s8.195-1.559 11.313-4.679c6.24-6.239 6.24-16.391 0.001-22.628zM25.428 25.428c-5.199 5.197-13.657 5.197-18.857 0-5.197-5.199-5.197-13.659 0-18.857 5.199-5.197 13.659-5.197 18.857 0 5.199 5.2 5.199 13.659 0 18.857z"></path>\n</svg>\n'}),t("span",null,this.selectCityInfo)),!this.isPhysical()&&t("div",{class:this.step2ItemClass()},t("label",{class:"s-gifting-schedule s-gifting-clickable",htmlFor:`schedule-${this.hostId}`},t("input",{type:"checkbox",name:"schedule",id:`schedule-${this.hostId}`,onChange:()=>this.toggleCalendar(),class:"s-checkbox"}),t("span",{class:"s-form-label"}," ",this.sendLater," "))),t("div",{class:this.getCalendarClasses(),ref:s=>this.calendarFormGroup=s},t("label",{class:"s-form-label"},this.selectSendDateAndTime),t("salla-datetime-picker",{value:this.deliveryDate,placeholder:this.selectSendDateAndTime,"enable-time":!0,"date-format":"Y-m-d h:i K",onPicked:s=>this.handleDateTimePicker(s)}),t("span",{class:"s-gifting-calendar-hint"},this.canNotEditOrderAfterSelectDate)),t("div",{class:this.step2ItemClass("s-gifting-step-two-footer")},t("a",{href:"#!",innerHTML:e,onClick:s=>this.goToStep1(s)}),t("salla-button",{onClick:()=>this.submitForm(),color:"primary",width:"wide"},t("span",null,this.sendGift)))))],t("slot",{key:"4cad8b174ab427e6f75b77357efc20e54d791ba4",name:"footer"})))]}};o.style=".s-gifting-steps-wrapper{transition:0.2s cubic-bezier(0.55, 0, 0.1, 1) 0s}.s-gifting-select{background-image:url(\"data:image/svg+xml;utf8,<svg version='1.1' fill='gray' xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><title>keyboard_arrow_down</title><path d='M9.875 11.104l6.125 6.125 6.125-6.125 1.875 1.875-8 8-8-8z'></path></svg>\");background-size:24px;background-repeat:no-repeat;background-position:99%;appearance:none}[dir=rtl] .s-gifting-select{background-position:5px}.s-gifting-widget-vertical .s-list-tile-item [slot=title]{display:flex;align-items:center;gap:1.5rem}.s-gifting-widget-vertical .s-list-tile-item-content{width:100%}";export{o as salla_gifting}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as a,h as s,H as o,a as t}from"./p-
|
|
4
|
+
import{r as a,h as s,H as o,a as t}from"./p-BJrHu3Q4.js";const n=class{constructor(s){a(this,s)}async mount(a){this.host.before(a)}render(){return s(o,{key:"2aa8c92dee7e62785fa0f45d967912ae8d6f96c0"})}async componentDidLoad(){await Salla.hooks.registerComponent("salla-hook",this)}get host(){return t(this)}};n.style=":host {\n all: unset;\n display: none; /* marker only */\n }";export{n as salla_hook}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as s,h as t,H as a,a as i}from"./p-
|
|
4
|
+
import{r as s,h as t,H as a,a as i}from"./p-BJrHu3Q4.js";const l=class{constructor(t){s(this,t),this.isVisible=!0,this.isMobile=!1,this.mobileBreakpoint=768,this.mobileQueryHandler=s=>this.isMobile=s.matches}async componentWillLoad(){await Salla.onReady(),await Salla.lang.onLoaded(),this.loadTranslations(),Salla.storage.get("cookies-consent")&&(this.isVisible=!1)}loadTranslations(){this.messageLabel=Salla.lang.get("common.cookies.message"),this.linkLabel=Salla.lang.get("common.cookies.link"),this.acceptLabel=Salla.lang.get("common.cookies.accept"),this.rejectLabel=Salla.lang.get("common.cookies.reject")}componentDidLoad(){this.mobileQuery=window.matchMedia(`(max-width: ${this.mobileBreakpoint-1}px)`),this.isMobile=this.mobileQuery.matches,this.mobileQuery.addEventListener("change",this.mobileQueryHandler)}disconnectedCallback(){this.mobileQuery?.removeEventListener("change",this.mobileQueryHandler)}async accept(){return this.isVisible=!1,Salla.event.emit("salla-cookies-bar::accepted"),Salla.storage.set("cookies-consent","accepted"),this.host}async reject(){return this.isVisible=!1,Salla.event.emit("salla-cookies-bar::rejected"),Salla.storage.set("cookies-consent","rejected"),this.host}isRtl(){return Salla.config.get("theme.is_rtl",!0)}render(){return this.isVisible?t(a,null,t("div",{dir:this.isRtl()?"rtl":"ltr",class:"s-cookies-bar fixed bottom-0 inset-x-0 z-50 bg-white p-4"},t("div",{class:"s-cookies-bar-content flex flex-col justify-center gap-6 max-w-screen-xl mx-auto px-4"},t("p",{class:"s-cookies-bar-message text-sm font-medium leading-relaxed text-gray-500 m-0"},this.messageLabel,Salla.config.get("policy_url")&&t("a",{href:Salla.config.get("policy_url"),target:"_blank",class:"s-cookies-bar-link text-primary ms-1"},this.linkLabel)),t("div",{class:"s-cookies-bar-actions flex flex-row gap-2 shrink-0"},t("salla-button",{class:"s-cookies-bar-btn--accept",color:"primary",fill:"solid",type:"button",size:this.isMobile?"small":"medium",onClick:()=>this.accept()},this.acceptLabel),t("salla-button",{class:"s-cookies-bar-btn--reject",fill:"outline",type:"button",size:this.isMobile?"small":"medium",onClick:()=>this.reject()},this.rejectLabel))))):t(a,null)}get host(){return i(this)}};l.style=":host{display:block;overflow:visible}.s-cookies-bar{box-shadow:0 0 20px 4px rgba(0, 0, 0, 0.15)}";export{l as salla_cookies_bar}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as s,H as a}from"./p-
|
|
4
|
+
import{r as t,h as s,H as a}from"./p-BJrHu3Q4.js";const l=class{constructor(s){t(this,s),this.order=null,this.loading=!0}async componentWillLoad(){await salla.onReady(),await this.loadOrder()}async onOrderIdChange(){this.loading=!0,this.order=null,await this.loadOrder()}get paymentUrl(){return this.order?.customer_editing?.payment_url}async loadOrder(){const t=this.orderId||salla.config.get("page.id");if(t)try{const s=await salla.order.api.getDetails(t);this.order=s?.data??s??null}catch(t){salla.logger?.warn?.("[salla-edit-order-button] failed to fetch order details",t),this.order=null}finally{this.loading=!1}else this.loading=!1}renderEditButton(){return s("salla-count-down",{prefixText:salla.lang.getWithDefault("pages.orders.edit_within","يمكنك التعديل خلال"),buttonHref:this.order?.edit_url,buttonText:salla.lang.getWithDefault("pages.orders.edit_order","تعديل الطلب"),buttonIcon:"sicon-edit",date:this.order?.editable_until,horizontal:!0,autoSegments:!0,withButton:!0,labeled:!1,size:"sm",color:"primary"})}render(){return this.loading||!this.order?null:this.order?.is_editable?s(a,null,this.renderEditButton()):this.paymentUrl?s(a,null,s("salla-button",{href:this.paymentUrl,color:"primary",size:"small"},s("i",{class:"sicon-wallet"}),salla.lang.getWithDefault("pages.orders.pay_difference","دفع فارق المبلغ"))):null}static get watchers(){return{orderId:["onOrderIdChange"]}}};l.style=":host{display:block}";export{l as salla_edit_order_button}
|