@salla.sa/twilight-components 2.14.551 → 2.14.553
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/apple-pay-order-options-DVyeUqBh.js +90 -0
- package/dist/cjs/{filepond-C99K1KEB.js → filepond-i59nX3lz.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-CggRjTNg.js → filepond-plugin-file-poster-BYzX1aNf.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-B009kdAV.js → filepond-plugin-file-validate-size-DycWnZhG.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-DZs9-bai.js → filepond-plugin-file-validate-type-z0JXBj53.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-DNNheErX.js → filepond-plugin-image-edit-CJRUCqBQ.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-ChN0IpOy.js → filepond-plugin-image-exif-orientation-DxMxZUYg.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-BZo2ftGo.js → filepond-plugin-image-preview-CjSIPPRf.js} +1 -1
- package/dist/cjs/{helpers-DHdDjm5V.js → helpers-Dm4BirHO.js} +2 -2
- package/dist/cjs/{index-0JUvtl0d.js → index-BDeMaV8l.js} +20 -24
- package/dist/cjs/{intlTelInput-D84-rI5D.js → intlTelInput-YxceQr88.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +5 -86
- 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-applied-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-attachment-view_9.cjs.entry.js +10 -10
- package/dist/cjs/salla-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
- package/dist/cjs/{salla-bullet-delivery_2.cjs.entry.js → salla-bullet-delivery_3.cjs.entry.js} +60 -3
- 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-cart-summary-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_9.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 → salla-count-down_2.cjs.entry.js} +209 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +2 -2
- 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 +108 -5
- 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_10.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- 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-slider.cjs.entry.js → salla-map_3.cjs.entry.js} +829 -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-next-order-coupon.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item_2.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-branch.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-shipments.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-embed.cjs.entry.js +1 -1
- package/dist/cjs/{salla-order-options-modal_2.cjs.entry.js → salla-product-card.cjs.entry.js} +1 -209
- 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-products-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +4 -2
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.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/salla-wishlist-actions.cjs.entry.js +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-D8r5xyK7.js → vanilla-picker-BkTzr0I6.js} +1 -1
- package/dist/collection/collection-manifest.json +6 -4
- package/dist/collection/components/salla-bullet-delivery/helpers.js +2 -2
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +7 -1
- package/dist/collection/components/salla-bullet-delivery-tag/salla-bullet-delivery-tag.css +70 -0
- package/dist/collection/components/salla-bullet-delivery-tag/salla-bullet-delivery-tag.js +77 -0
- package/dist/collection/components/salla-gifting/salla-gifting.css +3 -0
- package/dist/collection/components/salla-gifting/salla-gifting.js +106 -3
- package/dist/collection/components/salla-scopes/salla-scopes.js +3 -1
- package/dist/components/apple-pay-order-options.js +86 -0
- package/dist/components/helpers.js +2 -2
- package/dist/components/index.js +2 -2
- package/dist/components/salla-bullet-delivery-tag.d.ts +11 -0
- package/dist/components/salla-bullet-delivery-tag.js +76 -0
- package/dist/components/salla-bullet-delivery.js +7 -1
- package/dist/components/salla-gifting.js +165 -20
- package/dist/components/salla-quick-buy2.js +1 -82
- package/dist/components/salla-scopes.js +3 -1
- package/dist/esm/apple-pay-order-options-Bg2HuLRr.js +86 -0
- package/dist/esm/{filepond-DuMUHI7t.js → filepond-OzvsJA0M.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-Dv25V2UU.js → filepond-plugin-file-poster-CDQfaOXY.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-Dxl4yPm6.js → filepond-plugin-file-validate-size-1vRv7vgS.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-C602myuq.js → filepond-plugin-file-validate-type-pajN7jZu.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DLd3ht_R.js → filepond-plugin-image-edit-93DCmlU_.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-BaQ5DNLu.js → filepond-plugin-image-exif-orientation-CncCUIVb.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-C-RFNs7l.js → filepond-plugin-image-preview-Mz81wKGp.js} +1 -1
- package/dist/esm/{helpers-BDChq2t4.js → helpers-CV6uPJEJ.js} +2 -2
- package/dist/esm/{index-BsIeN-bg.js → index-Dx4PTJFl.js} +20 -24
- package/dist/esm/{intlTelInput-Cf6zBu5Y.js → intlTelInput-DEYUtZO9.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body_2.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +1 -1
- package/dist/esm/salla-add-product-button_5.entry.js +2 -83
- 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-applied-filters.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-attachment-view_9.entry.js +10 -10
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-basket-gap.entry.js +1 -1
- package/dist/esm/{salla-bullet-delivery_2.entry.js → salla-bullet-delivery_3.entry.js} +60 -4
- 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-cart-summary-card.entry.js +1 -1
- package/dist/esm/salla-cashback-banner.entry.js +1 -1
- package/dist/esm/salla-comment-factors.entry.js +1 -1
- package/dist/esm/salla-comment-form_9.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 → salla-count-down_2.entry.js} +209 -2
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +2 -2
- 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 +108 -5
- 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_10.entry.js +1 -1
- package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/{salla-slider.entry.js → salla-map_3.entry.js} +828 -2
- 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-next-order-coupon.entry.js +1 -1
- package/dist/esm/salla-notification-item_2.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-branch.entry.js +1 -1
- package/dist/esm/salla-order-cancel.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-shipments.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-embed.entry.js +1 -1
- package/dist/esm/{salla-order-options-modal_2.entry.js → salla-product-card.entry.js} +2 -209
- 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-products-slider.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +1 -1
- package/dist/esm/salla-review-factors-tags.entry.js +1 -1
- package/dist/esm/salla-review-order-item.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +4 -2
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.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/salla-wishlist-actions.entry.js +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-S7qZ7YZm.js → vanilla-picker-43VIKXEr.js} +1 -1
- package/dist/twilight/{p-56f164bb.entry.js → p-01dde8da.entry.js} +1 -1
- package/dist/twilight/p-05333b72.entry.js +4 -0
- package/dist/twilight/{p-13c4b450.entry.js → p-05920338.entry.js} +1 -1
- package/dist/twilight/{p-906b36e3.entry.js → p-05ed463f.entry.js} +1 -1
- package/dist/twilight/{p-3c2cc4fe.entry.js → p-08c448e7.entry.js} +1 -1
- package/dist/twilight/{p-2331e63a.entry.js → p-0f475a9c.entry.js} +1 -1
- package/dist/twilight/{p-869fe4c0.entry.js → p-129d396b.entry.js} +1 -1
- package/dist/twilight/{p-847cdd79.entry.js → p-12a40f7d.entry.js} +1 -1
- package/dist/twilight/{p-22cb8a9c.entry.js → p-144a349d.entry.js} +1 -1
- package/dist/twilight/{p-a8316527.entry.js → p-15470633.entry.js} +1 -1
- package/dist/twilight/{p-fed3efba.entry.js → p-1627f8c5.entry.js} +1 -1
- package/dist/twilight/{p-5918dd8d.entry.js → p-16c9bb12.entry.js} +1 -1
- package/dist/twilight/{p-5cd4b67f.entry.js → p-1a0db854.entry.js} +1 -1
- package/dist/twilight/{p-9dd126e2.entry.js → p-204db13a.entry.js} +1 -1
- package/dist/twilight/{p-0e3d72ab.entry.js → p-21b5ef79.entry.js} +1 -1
- package/dist/twilight/{p-b1e0bc90.entry.js → p-21dfba32.entry.js} +1 -1
- package/dist/twilight/{p-07adeb89.entry.js → p-24950b7c.entry.js} +1 -1
- package/dist/twilight/{p-ea968ba3.entry.js → p-24a5e070.entry.js} +1 -1
- package/dist/twilight/{p-0944d367.entry.js → p-26bf1509.entry.js} +1 -1
- package/dist/twilight/{p-6f58ac6a.entry.js → p-2718a5f2.entry.js} +1 -1
- package/dist/twilight/{p-2a683382.entry.js → p-2941175d.entry.js} +1 -1
- package/dist/twilight/{p-aa8962f8.entry.js → p-2dfbb461.entry.js} +1 -1
- package/dist/twilight/{p-e3e2baa2.entry.js → p-2f137e63.entry.js} +1 -1
- package/dist/twilight/{p-211324e6.entry.js → p-360e4f8e.entry.js} +1 -1
- package/dist/twilight/{p-b238c74b.entry.js → p-378efeff.entry.js} +1 -1
- package/dist/twilight/{p-2bef08e8.entry.js → p-3b4e2cf3.entry.js} +1 -1
- package/dist/twilight/{p-eb3a095b.entry.js → p-3b9cf7e4.entry.js} +1 -1
- package/dist/twilight/{p-cdba9d35.entry.js → p-40e417f1.entry.js} +1 -1
- package/dist/twilight/{p-18a604c5.entry.js → p-422c19a5.entry.js} +1 -1
- package/dist/twilight/{p-a64771f7.entry.js → p-45f512a8.entry.js} +1 -1
- package/dist/twilight/{p-49738042.entry.js → p-4be292da.entry.js} +1 -1
- package/dist/twilight/{p-6c5a1ded.entry.js → p-50a2be61.entry.js} +1 -1
- package/dist/twilight/{p-8ebb86ce.entry.js → p-5197cc6a.entry.js} +1 -1
- package/dist/twilight/{p-2ff7bb22.entry.js → p-58ee3cea.entry.js} +1 -1
- package/dist/twilight/{p-ecdbd18f.entry.js → p-619a9a6e.entry.js} +1 -1
- package/dist/twilight/{p-aa91a230.entry.js → p-6343cd09.entry.js} +1 -1
- package/dist/twilight/{p-01406425.entry.js → p-6533ba39.entry.js} +1 -1
- package/dist/twilight/{p-6edd1008.entry.js → p-6b62d934.entry.js} +1 -1
- package/dist/twilight/{p-357b5593.entry.js → p-6ee230b4.entry.js} +1 -1
- package/dist/twilight/{p-a30390a7.entry.js → p-6fffb603.entry.js} +1 -1
- package/dist/twilight/{p-f4f355e5.entry.js → p-74510683.entry.js} +1 -1
- package/dist/twilight/{p-704553fb.entry.js → p-74a4437f.entry.js} +1 -1
- package/dist/twilight/{p-6a746b8a.entry.js → p-7709f0dd.entry.js} +1 -1
- package/dist/twilight/{p-1abe8321.entry.js → p-79b4ca8e.entry.js} +1 -1
- package/dist/twilight/{p-3fb485a6.entry.js → p-7d3355a8.entry.js} +1 -1
- package/dist/twilight/{p-68d754be.entry.js → p-8123e013.entry.js} +1 -1
- package/dist/twilight/{p-4ef06a6f.entry.js → p-8137113a.entry.js} +1 -1
- package/dist/twilight/{p-5ba2eb55.entry.js → p-8140d052.entry.js} +1 -1
- package/dist/twilight/p-8968b284.entry.js +4 -0
- package/dist/twilight/{p-9f431f78.entry.js → p-8a57a89a.entry.js} +1 -1
- package/dist/twilight/{p-8711224a.entry.js → p-8bb4da9c.entry.js} +1 -1
- package/dist/twilight/{p-6d787fa0.entry.js → p-8bb74e84.entry.js} +1 -1
- package/dist/twilight/{p-ebc6ba28.entry.js → p-8ff29a31.entry.js} +1 -1
- package/dist/twilight/{p-af348a67.entry.js → p-90677c84.entry.js} +1 -1
- package/dist/twilight/{p-ef145c1e.entry.js → p-919b40e3.entry.js} +1 -1
- package/dist/twilight/{p-6f3516a1.entry.js → p-92a471ea.entry.js} +1 -1
- package/dist/twilight/{p-a344db00.entry.js → p-955661c8.entry.js} +1 -1
- package/dist/twilight/{p-d5215891.entry.js → p-9c0e3e8f.entry.js} +1 -1
- package/dist/twilight/{p-9025e5d9.entry.js → p-9c5571a0.entry.js} +1 -1
- package/dist/twilight/{p-BRZVMxhy.js → p-B5U60WIk.js} +2 -2
- package/dist/twilight/{p-wqmCmzsY.js → p-BKvFlB2x.js} +1 -1
- package/dist/twilight/p-Bg2HuLRr.js +4 -0
- package/dist/twilight/{p-DNS31w5e.js → p-C1H-fEuk.js} +1 -1
- package/dist/twilight/{p-BDChq2t4.js → p-CV6uPJEJ.js} +1 -1
- package/dist/twilight/{p-mgSPapOV.js → p-Cgw3EhC4.js} +1 -1
- package/dist/twilight/{p-CPiqlSTo.js → p-ChQewA0U.js} +1 -1
- package/dist/twilight/{p-B3oo4tIx.js → p-Dccf61n9.js} +1 -1
- package/dist/twilight/{p-BsIeN-bg.js → p-Dx4PTJFl.js} +1 -1
- package/dist/twilight/{p-035DwuUC.js → p-HzrPs4_N.js} +1 -1
- package/dist/twilight/{p-DeX830vG.js → p-ILDsy-mr.js} +1 -1
- package/dist/twilight/{p-9fdbe8a0.entry.js → p-a2c2f78b.entry.js} +25 -25
- package/dist/twilight/{p-a3579980.entry.js → p-a2cae5fd.entry.js} +1 -1
- package/dist/twilight/{p-2a3d30d1.entry.js → p-a4d28c99.entry.js} +1 -1
- package/dist/twilight/{p-a46a9d28.entry.js → p-a7bdbeb1.entry.js} +1 -1
- package/dist/twilight/{p-be0ac755.entry.js → p-a7ee89d7.entry.js} +1 -1
- package/dist/twilight/{p-1118bee2.entry.js → p-a95b7da2.entry.js} +1 -1
- package/dist/twilight/{p-84cffb13.entry.js → p-a965c7da.entry.js} +1 -1
- package/dist/twilight/{p-e875f53e.entry.js → p-aa88c61e.entry.js} +1 -1
- package/dist/twilight/{p-a037e47d.entry.js → p-acff1e55.entry.js} +1 -1
- package/dist/twilight/{p-ff37c2af.entry.js → p-b1d3bdb6.entry.js} +1 -1
- package/dist/twilight/{p-2df31e90.entry.js → p-b54f9dd8.entry.js} +1 -1
- package/dist/twilight/{p-56845467.entry.js → p-b572b38c.entry.js} +1 -1
- package/dist/twilight/p-bdfceb12.entry.js +4 -0
- package/dist/twilight/{p-27456209.entry.js → p-be080eb3.entry.js} +1 -1
- package/dist/twilight/p-bfd1e64f.entry.js +4 -0
- package/dist/twilight/{p-b5a2342c.entry.js → p-c0ff19e0.entry.js} +1 -1
- package/dist/twilight/p-c2823b78.entry.js +4 -0
- package/dist/twilight/{p-18639885.entry.js → p-c2f2a752.entry.js} +1 -1
- package/dist/twilight/{p-523572e9.entry.js → p-c53d45d1.entry.js} +1 -1
- package/dist/twilight/{p-3aa6fa7d.entry.js → p-c653dbde.entry.js} +1 -1
- package/dist/twilight/{p-f037e508.entry.js → p-c6708390.entry.js} +1 -1
- package/dist/twilight/{p-efe6493f.entry.js → p-cabecab4.entry.js} +1 -1
- package/dist/twilight/{p-2c48bb97.entry.js → p-cadfb356.entry.js} +1 -1
- package/dist/twilight/{p-5dfd449d.entry.js → p-cddaa208.entry.js} +1 -1
- package/dist/twilight/{p-a9ef3c52.entry.js → p-d97e4c69.entry.js} +1 -1
- package/dist/twilight/{p-0a332226.entry.js → p-e1109a12.entry.js} +1 -1
- package/dist/twilight/{p-683db553.entry.js → p-e315d524.entry.js} +1 -1
- package/dist/twilight/{p-569c6d6c.entry.js → p-e4dd05a7.entry.js} +1 -1
- package/dist/twilight/{p-501c0798.entry.js → p-e5b29085.entry.js} +1 -1
- package/dist/twilight/{p-43f8f33b.entry.js → p-e97e121a.entry.js} +1 -1
- package/dist/twilight/{p-83a5b8a4.entry.js → p-f1587a83.entry.js} +1 -1
- package/dist/twilight/p-f4e80187.entry.js +4 -0
- package/dist/twilight/{p-a01f64e7.entry.js → p-f5cff7aa.entry.js} +1 -1
- package/dist/twilight/{p-CaCiueRc.js → p-lRRdZqp5.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-bullet-delivery/interfaces.d.ts +2 -0
- package/dist/types/components/salla-bullet-delivery-tag/salla-bullet-delivery-tag.d.ts +26 -0
- package/dist/types/components/salla-gifting/salla-gifting.d.ts +29 -0
- package/dist/types/components.d.ts +77 -0
- package/package.json +5 -5
- package/dist/cjs/salla-map_2.cjs.entry.js +0 -835
- package/dist/esm/salla-map_2.entry.js +0 -832
- package/dist/twilight/p-1bf18c56.entry.js +0 -4
- package/dist/twilight/p-47713dd1.entry.js +0 -4
- package/dist/twilight/p-49f9e536.entry.js +0 -4
- package/dist/twilight/p-54974d98.entry.js +0 -4
- package/dist/twilight/p-709c2184.entry.js +0 -4
- package/dist/twilight/p-90f29c99.entry.js +0 -4
- package/dist/twilight/p-a0ed97f5.entry.js +0 -4
|
@@ -1,9 +1,835 @@
|
|
|
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-Dx4PTJFl.js';
|
|
5
|
+
import { L as Location } from './location-BO5AoBAP.js';
|
|
5
6
|
import { a as ArrowRightIcon, A as ArrowLeftIcon } from './keyboard_arrow_right-Vqpj4CWE.js';
|
|
6
7
|
|
|
8
|
+
var Edit = `<!-- Generated by IcoMoon.io -->
|
|
9
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
10
|
+
<title>edit</title>
|
|
11
|
+
<path d="M30.583 1.417c-1.828-1.829-5.019-1.829-6.847 0l-13.396 13.396c-0.161 0.161-0.279 0.361-0.341 0.581l-1.949 6.911c-0.131 0.464 0 0.964 0.341 1.305 0.253 0.252 0.593 0.389 0.943 0.389 0.121 0 0.243-0.016 0.361-0.051l6.911-1.949c0.22-0.061 0.419-0.179 0.581-0.34l10.455-10.453s0 0 0 0l2.941-2.941c1.887-1.888 1.887-4.96 0-6.848zM15.547 19.528l-4.284 1.208 1.208-4.284 9.265-9.265 3.076 3.076zM28.696 6.38l-1.999 1.999-3.076-3.076 1.999-1.999c0.849-0.848 2.227-0.848 3.076 0 0.848 0.848 0.848 2.227 0 3.076zM24 20c-0.737 0-1.333 0.597-1.333 1.333v4c0 2.205-1.795 4-4 4h-12c-2.205 0-4-1.795-4-4v-12c0-2.205 1.795-4 4-4h4c0.737 0 1.333-0.597 1.333-1.333s-0.596-1.333-1.333-1.333h-4c-3.676 0-6.667 2.991-6.667 6.667v12c0 3.676 2.991 6.667 6.667 6.667h12c3.676 0 6.667-2.991 6.667-6.667v-4c0-0.736-0.596-1.333-1.333-1.333z"></path>
|
|
12
|
+
</svg>
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
var CurrentLocation = `<!-- Generated by IcoMoon.io -->
|
|
16
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
17
|
+
<title>location-target</title>
|
|
18
|
+
<path d="M16 9.333c-3.676 0-6.667 2.991-6.667 6.667s2.991 6.667 6.667 6.667 6.667-2.991 6.667-6.667-2.991-6.667-6.667-6.667zM16 20c-2.205 0-4-1.795-4-4s1.795-4 4-4 4 1.795 4 4-1.795 4-4 4zM30.667 14.667h-1.401c-0.627-6.289-5.643-11.305-11.932-11.932v-1.401c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v1.401c-6.289 0.627-11.305 5.643-11.932 11.932h-1.401c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h1.401c0.628 6.289 5.643 11.305 11.932 11.932v1.401c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-1.401c6.289-0.628 11.305-5.643 11.932-11.932h1.401c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333zM16 26.667c-5.881 0-10.667-4.785-10.667-10.667s4.785-10.667 10.667-10.667 10.667 4.785 10.667 10.667-4.785 10.667-10.667 10.667z"></path>
|
|
19
|
+
</svg>
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
var LocationMarker = `<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
23
|
+
<rect width="36" height="36" rx="18" fill="#5CD5C4"/>
|
|
24
|
+
<path d="M18 10C17.0104 10 16.1458 10.1771 15.4062 10.5312C14.6562 10.8854 14.026 11.3542 13.5156 11.9375C13.0156 12.5104 12.6406 13.1667 12.3906 13.9062C12.1302 14.6458 12 15.401 12 16.1719C12 16.8906 12.2604 17.7656 12.7812 18.7969C13.3021 19.8281 13.8854 20.8333 14.5312 21.8125C15.1875 22.7812 15.8073 23.6406 16.3906 24.3906C16.9844 25.1302 17.349 25.5885 17.4844 25.7656C17.5469 25.8385 17.625 25.8958 17.7188 25.9375C17.8125 25.9792 17.9062 26 18 26C18.1042 26 18.1979 25.9792 18.2812 25.9375C18.375 25.8958 18.4531 25.8385 18.5156 25.7656C18.651 25.5885 19.0156 25.1302 19.6094 24.3906C20.1927 23.6406 20.8073 22.7812 21.4531 21.8125C22.1094 20.8333 22.6979 19.8281 23.2188 18.7969C23.7396 17.7656 24 16.8906 24 16.1719C24 15.401 23.8698 14.6458 23.6094 13.9062C23.3594 13.1667 22.9792 12.5104 22.4688 11.9375C21.9688 11.3542 21.3438 10.8854 20.5938 10.5312C19.8542 10.1771 18.9896 10 18 10ZM18 24.2812C17.5833 23.75 17.1094 23.1198 16.5781 22.3906C16.0365 21.651 15.526 20.901 15.0469 20.1406C14.5677 19.3698 14.1615 18.6302 13.8281 17.9219C13.4948 17.2135 13.3281 16.6302 13.3281 16.1719C13.3281 15.5885 13.4219 15.0052 13.6094 14.4219C13.7969 13.849 14.0781 13.3333 14.4531 12.875C14.8385 12.4167 15.3281 12.0469 15.9219 11.7656C16.5052 11.474 17.1979 11.3281 18 11.3281C18.8021 11.3281 19.4948 11.474 20.0781 11.7656C20.6719 12.0469 21.1562 12.4167 21.5312 12.875C21.9167 13.3333 22.2031 13.849 22.3906 14.4219C22.5781 15.0052 22.6719 15.5885 22.6719 16.1719C22.6719 16.6302 22.5052 17.2135 22.1719 17.9219C21.8385 18.6302 21.4323 19.3698 20.9531 20.1406C20.474 20.901 19.9688 21.651 19.4375 22.3906C18.8958 23.1198 18.4167 23.75 18 24.2812ZM18 13.3281C17.2604 13.3281 16.6302 13.5885 16.1094 14.1094C15.5885 14.6302 15.3281 15.2604 15.3281 16C15.3281 16.7396 15.5885 17.3698 16.1094 17.8906C16.6302 18.4115 17.2604 18.6719 18 18.6719C18.7396 18.6719 19.3698 18.4115 19.8906 17.8906C20.4115 17.3698 20.6719 16.7396 20.6719 16C20.6719 15.2604 20.4115 14.6302 19.8906 14.1094C19.3698 13.5885 18.7396 13.3281 18 13.3281ZM18 17.3281C17.6354 17.3281 17.3229 17.1979 17.0625 16.9375C16.8021 16.6771 16.6719 16.3646 16.6719 16C16.6719 15.6354 16.8021 15.3229 17.0625 15.0625C17.3229 14.8021 17.6354 14.6719 18 14.6719C18.3646 14.6719 18.6771 14.8021 18.9375 15.0625C19.1979 15.3229 19.3281 15.6354 19.3281 16C19.3281 16.3646 19.1979 16.6771 18.9375 16.9375C18.6771 17.1979 18.3646 17.3281 18 17.3281Z" fill="white"/>
|
|
25
|
+
</svg>
|
|
26
|
+
`;
|
|
27
|
+
|
|
28
|
+
// export json
|
|
29
|
+
const light = [
|
|
30
|
+
{
|
|
31
|
+
featureType: 'water',
|
|
32
|
+
elementType: 'geometry',
|
|
33
|
+
stylers: [
|
|
34
|
+
{
|
|
35
|
+
color: '#e9e9e9',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
lightness: 17,
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
featureType: 'landscape',
|
|
44
|
+
elementType: 'geometry',
|
|
45
|
+
stylers: [
|
|
46
|
+
{
|
|
47
|
+
color: '#f5f5f5',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
lightness: 20,
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
featureType: 'road.highway',
|
|
56
|
+
elementType: 'geometry.fill',
|
|
57
|
+
stylers: [
|
|
58
|
+
{
|
|
59
|
+
color: '#ffffff',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
lightness: 17,
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
featureType: 'road.highway',
|
|
68
|
+
elementType: 'geometry.stroke',
|
|
69
|
+
stylers: [
|
|
70
|
+
{
|
|
71
|
+
color: '#ffffff',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
lightness: 29,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
weight: 0.2,
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
featureType: 'road.arterial',
|
|
83
|
+
elementType: 'geometry',
|
|
84
|
+
stylers: [
|
|
85
|
+
{
|
|
86
|
+
color: '#ffffff',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
lightness: 18,
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
featureType: 'road.local',
|
|
95
|
+
elementType: 'geometry',
|
|
96
|
+
stylers: [
|
|
97
|
+
{
|
|
98
|
+
color: '#ffffff',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
lightness: 16,
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
featureType: 'poi',
|
|
107
|
+
elementType: 'geometry',
|
|
108
|
+
stylers: [
|
|
109
|
+
{
|
|
110
|
+
color: '#f5f5f5',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
lightness: 21,
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
featureType: 'poi.park',
|
|
119
|
+
elementType: 'geometry',
|
|
120
|
+
stylers: [
|
|
121
|
+
{
|
|
122
|
+
color: '#dedede',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
lightness: 21,
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
elementType: 'labels.text.stroke',
|
|
131
|
+
stylers: [
|
|
132
|
+
{
|
|
133
|
+
visibility: 'on',
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
color: '#ffffff',
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
lightness: 16,
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
elementType: 'labels.text.fill',
|
|
145
|
+
stylers: [
|
|
146
|
+
{
|
|
147
|
+
saturation: 36,
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
color: '#333333',
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
lightness: 40,
|
|
154
|
+
},
|
|
155
|
+
],
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
elementType: 'labels.icon',
|
|
159
|
+
stylers: [
|
|
160
|
+
{
|
|
161
|
+
visibility: 'off',
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
featureType: 'transit',
|
|
167
|
+
elementType: 'geometry',
|
|
168
|
+
stylers: [
|
|
169
|
+
{
|
|
170
|
+
color: '#f2f2f2',
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
lightness: 19,
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
featureType: 'administrative',
|
|
179
|
+
elementType: 'geometry.fill',
|
|
180
|
+
stylers: [
|
|
181
|
+
{
|
|
182
|
+
color: '#fefefe',
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
lightness: 20,
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
featureType: 'administrative',
|
|
191
|
+
elementType: 'geometry.stroke',
|
|
192
|
+
stylers: [
|
|
193
|
+
{
|
|
194
|
+
color: '#fefefe',
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
lightness: 17,
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
weight: 1.2,
|
|
201
|
+
},
|
|
202
|
+
],
|
|
203
|
+
},
|
|
204
|
+
];
|
|
205
|
+
const dark = [
|
|
206
|
+
{
|
|
207
|
+
elementType: 'geometry',
|
|
208
|
+
stylers: [
|
|
209
|
+
{
|
|
210
|
+
color: '#242f3e',
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
elementType: 'labels.text.fill',
|
|
216
|
+
stylers: [
|
|
217
|
+
{
|
|
218
|
+
color: '#746855',
|
|
219
|
+
},
|
|
220
|
+
],
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
elementType: 'labels.text.stroke',
|
|
224
|
+
stylers: [
|
|
225
|
+
{
|
|
226
|
+
color: '#242f3e',
|
|
227
|
+
},
|
|
228
|
+
],
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
featureType: 'administrative.locality',
|
|
232
|
+
elementType: 'labels.text.fill',
|
|
233
|
+
stylers: [
|
|
234
|
+
{
|
|
235
|
+
color: '#d59563',
|
|
236
|
+
},
|
|
237
|
+
],
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
featureType: 'poi',
|
|
241
|
+
elementType: 'labels.text.fill',
|
|
242
|
+
stylers: [
|
|
243
|
+
{
|
|
244
|
+
color: '#d59563',
|
|
245
|
+
},
|
|
246
|
+
],
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
featureType: 'poi.park',
|
|
250
|
+
elementType: 'geometry',
|
|
251
|
+
stylers: [
|
|
252
|
+
{
|
|
253
|
+
color: '#263c3f',
|
|
254
|
+
},
|
|
255
|
+
],
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
featureType: 'poi.park',
|
|
259
|
+
elementType: 'labels.text.fill',
|
|
260
|
+
stylers: [
|
|
261
|
+
{
|
|
262
|
+
color: '#6b9a76',
|
|
263
|
+
},
|
|
264
|
+
],
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
featureType: 'road',
|
|
268
|
+
elementType: 'geometry',
|
|
269
|
+
stylers: [
|
|
270
|
+
{
|
|
271
|
+
color: '#38414e',
|
|
272
|
+
},
|
|
273
|
+
],
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
featureType: 'road',
|
|
277
|
+
elementType: 'geometry.stroke',
|
|
278
|
+
stylers: [
|
|
279
|
+
{
|
|
280
|
+
color: '#212a37',
|
|
281
|
+
},
|
|
282
|
+
],
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
featureType: 'road',
|
|
286
|
+
elementType: 'labels.text.fill',
|
|
287
|
+
stylers: [
|
|
288
|
+
{
|
|
289
|
+
color: '#9ca5b3',
|
|
290
|
+
},
|
|
291
|
+
],
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
featureType: 'road.highway',
|
|
295
|
+
elementType: 'geometry',
|
|
296
|
+
stylers: [
|
|
297
|
+
{
|
|
298
|
+
color: '#746855',
|
|
299
|
+
},
|
|
300
|
+
],
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
featureType: 'road.highway',
|
|
304
|
+
elementType: 'geometry.stroke',
|
|
305
|
+
stylers: [
|
|
306
|
+
{
|
|
307
|
+
color: '#1f2835',
|
|
308
|
+
},
|
|
309
|
+
],
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
featureType: 'road.highway',
|
|
313
|
+
elementType: 'labels.text.fill',
|
|
314
|
+
stylers: [
|
|
315
|
+
{
|
|
316
|
+
color: '#f3d19c',
|
|
317
|
+
},
|
|
318
|
+
],
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
featureType: 'transit',
|
|
322
|
+
elementType: 'geometry',
|
|
323
|
+
stylers: [
|
|
324
|
+
{
|
|
325
|
+
color: '#2f3948',
|
|
326
|
+
},
|
|
327
|
+
],
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
featureType: 'transit.station',
|
|
331
|
+
elementType: 'labels.text.fill',
|
|
332
|
+
stylers: [
|
|
333
|
+
{
|
|
334
|
+
color: '#d59563',
|
|
335
|
+
},
|
|
336
|
+
],
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
featureType: 'water',
|
|
340
|
+
elementType: 'geometry',
|
|
341
|
+
stylers: [
|
|
342
|
+
{
|
|
343
|
+
color: '#17263c',
|
|
344
|
+
},
|
|
345
|
+
],
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
featureType: 'water',
|
|
349
|
+
elementType: 'labels.text.fill',
|
|
350
|
+
stylers: [
|
|
351
|
+
{
|
|
352
|
+
color: '#515c6d',
|
|
353
|
+
},
|
|
354
|
+
],
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
featureType: 'water',
|
|
358
|
+
elementType: 'labels.text.stroke',
|
|
359
|
+
stylers: [
|
|
360
|
+
{
|
|
361
|
+
color: '#17263c',
|
|
362
|
+
},
|
|
363
|
+
],
|
|
364
|
+
},
|
|
365
|
+
];
|
|
366
|
+
var styles = {
|
|
367
|
+
light,
|
|
368
|
+
dark,
|
|
369
|
+
};
|
|
370
|
+
|
|
371
|
+
class Loader {
|
|
372
|
+
constructor(apiKey = null, options = {}) {
|
|
373
|
+
this.apiKey = apiKey;
|
|
374
|
+
this.options = options;
|
|
375
|
+
if (typeof window === 'undefined') {
|
|
376
|
+
throw new Error('google-maps is supported only in browser environment');
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
load() {
|
|
380
|
+
if (typeof this.api !== 'undefined') {
|
|
381
|
+
return Promise.resolve(this.api);
|
|
382
|
+
}
|
|
383
|
+
if (typeof this.loader !== 'undefined') {
|
|
384
|
+
return this.loader;
|
|
385
|
+
}
|
|
386
|
+
window[Loader.CALLBACK_NAME] = () => {
|
|
387
|
+
this.api = window['google'];
|
|
388
|
+
if (typeof this.resolve === 'undefined') {
|
|
389
|
+
throw new Error('Should not happen');
|
|
390
|
+
}
|
|
391
|
+
this.resolve(this.api);
|
|
392
|
+
};
|
|
393
|
+
window['gm_authFailure'] = () => {
|
|
394
|
+
if (typeof this.reject === 'undefined') {
|
|
395
|
+
throw new Error('Should not happen');
|
|
396
|
+
}
|
|
397
|
+
this.reject(new Error('google-maps: authentication error'));
|
|
398
|
+
};
|
|
399
|
+
return this.loader = new Promise((resolve, reject) => {
|
|
400
|
+
this.resolve = resolve;
|
|
401
|
+
this.reject = reject;
|
|
402
|
+
const script = document.createElement('script');
|
|
403
|
+
script.src = this.createUrl();
|
|
404
|
+
script.async = true;
|
|
405
|
+
script.onerror = (e) => reject(e);
|
|
406
|
+
document.head.appendChild(script);
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
createUrl() {
|
|
410
|
+
const parameters = [
|
|
411
|
+
`callback=${Loader.CALLBACK_NAME}`,
|
|
412
|
+
];
|
|
413
|
+
if (this.apiKey) {
|
|
414
|
+
parameters.push(`key=${this.apiKey}`);
|
|
415
|
+
}
|
|
416
|
+
for (let name in this.options) {
|
|
417
|
+
if (this.options.hasOwnProperty(name)) {
|
|
418
|
+
let value = this.options[name];
|
|
419
|
+
if (name === 'version') {
|
|
420
|
+
name = 'v';
|
|
421
|
+
}
|
|
422
|
+
if (name === 'libraries') {
|
|
423
|
+
value = value.join(',');
|
|
424
|
+
}
|
|
425
|
+
parameters.push(`${name}=${value}`);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
return `https://maps.googleapis.com/maps/api/js?${parameters.join('&')}`;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
Loader.CALLBACK_NAME = '_dk_google_maps_loader_cb';
|
|
432
|
+
|
|
433
|
+
const sallaMapCss = "/*!twlt*/.s-map-wrapper{position:relative}.s-map-value-input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;white-space:nowrap;border:0;opacity:0;pointer-events:none}.s-map-wrapper.s-has-error .s-map-location-button{outline:2px solid rgb(248, 113, 113);outline-offset:2px}.visible{visibility:visible}.s-has-error{--tw-border-opacity:1;border-color:rgb(248 113 113 / var(--tw-border-opacity, 1))}.s-has-error:focus{--tw-border-opacity:1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.s-has-error{--tw-border-opacity:1 !important;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1)) !important;--tw-text-opacity:1 !important;color:rgb(239 68 68 / var(--tw-text-opacity, 1)) !important}.s-map-modal-title{position:relative;margin-top:1rem;margin-bottom:1rem;padding-left:1rem;padding-right:1rem}.s-map-location-icon{margin-right:0.5rem}.s-map-location-icon:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-left:0.5rem;margin-right:0px}.s-map-location-icon svg{height:1rem !important;width:1rem !important}.s-map-modal-body{position:relative;overflow:hidden}.s-map-element{height:400px;width:100%}.s-map-search-wrapper{position:absolute;top:0px;z-index:1;margin:1.25rem;width:-webkit-fill-available}.s-map-search-wrapper input{height:2.5rem;width:100%;padding:0.5rem}.s-map-search-wrapper input:where([dir=\"rtl\"],[dir=\"rtl\"] *){text-align:right}.s-map-search-results{margin-top:0px;display:flex;height:6rem;flex-direction:column;padding:0.5rem}.s-map-modal-body .s-loading-container{position:absolute;margin:0px;padding:5rem}.s-map-my-location-button{position:absolute;bottom:1.5rem;left:0px;margin:0.5rem}.s-map-location-button .s-button-text{display:flex;align-items:center}.s-map-submit-button button{border-top-right-radius:0px;border-top-left-radius:0px;padding-top:12px;padding-bottom:12px}";
|
|
434
|
+
|
|
435
|
+
const SallaMap = class {
|
|
436
|
+
constructor(hostRef) {
|
|
437
|
+
registerInstance(this, hostRef);
|
|
438
|
+
this.selected = createEvent(this, "selected");
|
|
439
|
+
this.mapClicked = createEvent(this, "mapClicked");
|
|
440
|
+
this.currentLocationChanged = createEvent(this, "currentLocationChanged");
|
|
441
|
+
this.invalidInput = createEvent(this, "invalidInput");
|
|
442
|
+
this.defaultLat = 21.419421; //Mecca 🕋
|
|
443
|
+
this.defaultLng = 39.82553; //Mecca 🕋
|
|
444
|
+
// state variables
|
|
445
|
+
this.modalActivityTitle = salla.lang.get('pages.checkout.select_your_address_from_map');
|
|
446
|
+
this.confirmButtonTitle = salla.lang.get('pages.checkout.confirm_address');
|
|
447
|
+
this.locateButtonTitle = salla.lang.get('pages.cart.detect_location');
|
|
448
|
+
this.locateButtonEdit = salla.lang.get('common.elements.edit');
|
|
449
|
+
this.searchPlaceholder = salla.lang.get('pages.checkout.search_for_address');
|
|
450
|
+
this.searchInputValue = null;
|
|
451
|
+
this.formattedAddress = '';
|
|
452
|
+
this.geolocationError = false;
|
|
453
|
+
/**
|
|
454
|
+
* File input name for the native formData
|
|
455
|
+
*/
|
|
456
|
+
this.name = 'location';
|
|
457
|
+
/**
|
|
458
|
+
* Set if the location input is required or not
|
|
459
|
+
*/
|
|
460
|
+
this.required = false;
|
|
461
|
+
/**
|
|
462
|
+
* Disable or enable actions
|
|
463
|
+
*/
|
|
464
|
+
this.readonly = false;
|
|
465
|
+
/**
|
|
466
|
+
* Sets the search bar visibility.
|
|
467
|
+
*/
|
|
468
|
+
this.searchable = false;
|
|
469
|
+
/**
|
|
470
|
+
* Sets start map zoom.
|
|
471
|
+
*/
|
|
472
|
+
this.zoom = 10;
|
|
473
|
+
/**
|
|
474
|
+
* Sets map style.
|
|
475
|
+
*/
|
|
476
|
+
this.theme = 'light';
|
|
477
|
+
salla.lang.onLoaded(() => {
|
|
478
|
+
this.modalActivityTitle = salla.lang.get('pages.checkout.select_your_address_from_map');
|
|
479
|
+
this.confirmButtonTitle = salla.lang.get('pages.checkout.confirm_address');
|
|
480
|
+
this.locateButtonTitle = salla.lang.get('pages.cart.detect_location');
|
|
481
|
+
this.locateButtonEdit = salla.lang.get('common.elements.edit');
|
|
482
|
+
this.searchPlaceholder = salla.lang.get('pages.checkout.search_for_address');
|
|
483
|
+
});
|
|
484
|
+
salla.onReady(() => {
|
|
485
|
+
this.apiKey = salla.config.get('store.settings.keys.maps');
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
formatAddress(address) {
|
|
489
|
+
return address.length > 25 ? address.substring(0, 25) + '...' : address;
|
|
490
|
+
}
|
|
491
|
+
/** Treat numeric `0` as valid; reject null/undefined/blank/NaN (incl. whitespace). */
|
|
492
|
+
hasCoordinate(value) {
|
|
493
|
+
if (value === null || value === undefined) {
|
|
494
|
+
return false;
|
|
495
|
+
}
|
|
496
|
+
if (typeof value === 'number') {
|
|
497
|
+
return Number.isFinite(value);
|
|
498
|
+
}
|
|
499
|
+
const trimmed = String(value).trim();
|
|
500
|
+
if (trimmed === '') {
|
|
501
|
+
return false;
|
|
502
|
+
}
|
|
503
|
+
return Number.isFinite(Number(trimmed));
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Prefer confirmed selection; fall back to lat/lng props so cart/order-form
|
|
507
|
+
* options with an existing location keep a valid form value before geocode finishes.
|
|
508
|
+
*/
|
|
509
|
+
getLatLng() {
|
|
510
|
+
const lat = this.hasCoordinate(this.selectedLat) ? this.selectedLat : this.lat;
|
|
511
|
+
const lng = this.hasCoordinate(this.selectedLng) ? this.selectedLng : this.lng;
|
|
512
|
+
return this.hasCoordinate(lat) && this.hasCoordinate(lng) ? `${lat}, ${lng}` : '';
|
|
513
|
+
}
|
|
514
|
+
syncMapInputValue() {
|
|
515
|
+
if (!this.mapInput) {
|
|
516
|
+
return;
|
|
517
|
+
}
|
|
518
|
+
this.mapInput.value = this.getLatLng();
|
|
519
|
+
this.mapInput.setCustomValidity('');
|
|
520
|
+
}
|
|
521
|
+
focusLocateControl() {
|
|
522
|
+
const locateButton = this.host.querySelector('.s-map-location-button');
|
|
523
|
+
locateButton?.focus?.();
|
|
524
|
+
}
|
|
525
|
+
componentWillLoad() {
|
|
526
|
+
if (this.hasCoordinate(this.lat) && this.hasCoordinate(this.lng)) {
|
|
527
|
+
this.selectedLat = this.lat;
|
|
528
|
+
this.selectedLng = this.lng;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
getPositionAddress(location, submit = false) {
|
|
532
|
+
// get address and set it to search input
|
|
533
|
+
const Geocoder = new google.maps.Geocoder();
|
|
534
|
+
Geocoder.geocode({
|
|
535
|
+
location,
|
|
536
|
+
}, (results, status) => {
|
|
537
|
+
if (status === google.maps.GeocoderStatus.OK) {
|
|
538
|
+
if (this.searchable) {
|
|
539
|
+
this.searchInputValue = results[0].formatted_address;
|
|
540
|
+
this.searchInput.value = results[0].formatted_address;
|
|
541
|
+
}
|
|
542
|
+
if (submit) {
|
|
543
|
+
this.formattedAddress = results[0].formatted_address;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
initGoogleMaps(options, mapDOM) {
|
|
549
|
+
const loader = new Loader(this.apiKey, options);
|
|
550
|
+
loader.load().then(google => {
|
|
551
|
+
this.map = new google.maps.Map(mapDOM, {
|
|
552
|
+
center: (this.lat || this.lng) ? {
|
|
553
|
+
lat: this.lat,
|
|
554
|
+
lng: this.lng,
|
|
555
|
+
} : {
|
|
556
|
+
lat: this.defaultLat,
|
|
557
|
+
lng: this.defaultLng,
|
|
558
|
+
},
|
|
559
|
+
zoom: this.zoom,
|
|
560
|
+
zoomControl: true,
|
|
561
|
+
mapTypeControl: false,
|
|
562
|
+
scaleControl: false,
|
|
563
|
+
streetViewControl: false,
|
|
564
|
+
rotateControl: false,
|
|
565
|
+
fullscreenControl: false,
|
|
566
|
+
disableDefaultUI: false,
|
|
567
|
+
});
|
|
568
|
+
this.map.setOptions({
|
|
569
|
+
styles: this.theme === 'light' ? styles.light : styles.dark,
|
|
570
|
+
});
|
|
571
|
+
this.marker = new google.maps.Marker({
|
|
572
|
+
position: this.map.getCenter(),
|
|
573
|
+
map: this.map,
|
|
574
|
+
icon: {
|
|
575
|
+
url: 'data:image/svg+xml;utf8,' + encodeURIComponent(LocationMarker),
|
|
576
|
+
scaledSize: new google.maps.Size(30, 30),
|
|
577
|
+
},
|
|
578
|
+
});
|
|
579
|
+
if (this.searchable) {
|
|
580
|
+
const searchBox = new google.maps.places.SearchBox(this.searchInput);
|
|
581
|
+
google.maps.event.addListener(searchBox, 'places_changed', () => {
|
|
582
|
+
const places = searchBox.getPlaces();
|
|
583
|
+
// goto first place
|
|
584
|
+
if (places.length > 0 && this.map) {
|
|
585
|
+
this.map.setCenter(places[0].geometry.location);
|
|
586
|
+
this.lat = places[0].geometry.location.lat();
|
|
587
|
+
this.lng = places[0].geometry.location.lng();
|
|
588
|
+
// set marker
|
|
589
|
+
this.marker.setPosition(places[0].geometry.location);
|
|
590
|
+
this.searchInputValue = places[0].formatted_address;
|
|
591
|
+
this.formattedAddress = places[0].formatted_address;
|
|
592
|
+
}
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
// add listener to map
|
|
596
|
+
google.maps.event.addListener(this.map, 'click', e => {
|
|
597
|
+
if (this.readonly)
|
|
598
|
+
return;
|
|
599
|
+
this.marker.setPosition(e.latLng);
|
|
600
|
+
this.lat = e.latLng.lat();
|
|
601
|
+
this.lng = e.latLng.lng();
|
|
602
|
+
this.getPositionAddress(e.latLng);
|
|
603
|
+
this.mapClicked.emit({
|
|
604
|
+
lat: e.latLng.lat(),
|
|
605
|
+
lng: e.latLng.lng(),
|
|
606
|
+
address: this.formattedAddress ? this.formattedAddress : null,
|
|
607
|
+
});
|
|
608
|
+
});
|
|
609
|
+
if (!this.lat && !this.lng) {
|
|
610
|
+
this.getCurrentLocation();
|
|
611
|
+
if (this.geolocationError) {
|
|
612
|
+
this.map.setCenter({
|
|
613
|
+
lat: this.lat,
|
|
614
|
+
lng: this.lng,
|
|
615
|
+
});
|
|
616
|
+
this.marker.setPosition({
|
|
617
|
+
lat: this.lat,
|
|
618
|
+
lng: this.lng,
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
});
|
|
623
|
+
}
|
|
624
|
+
getCurrentLocation() {
|
|
625
|
+
if (navigator.geolocation && this.map) {
|
|
626
|
+
navigator.geolocation.getCurrentPosition(position => {
|
|
627
|
+
// set map to this location
|
|
628
|
+
const mapOptions = {
|
|
629
|
+
center: new google.maps.LatLng(position.coords.latitude, position.coords.longitude),
|
|
630
|
+
zoom: 15,
|
|
631
|
+
};
|
|
632
|
+
this.map.setOptions(mapOptions);
|
|
633
|
+
// set marker
|
|
634
|
+
this.marker.setPosition(mapOptions.center);
|
|
635
|
+
this.getPositionAddress(mapOptions.center);
|
|
636
|
+
this.lat = position.coords.latitude;
|
|
637
|
+
this.lng = position.coords.longitude;
|
|
638
|
+
this.currentLocationChanged.emit({
|
|
639
|
+
lat: position.coords.latitude,
|
|
640
|
+
lng: position.coords.longitude,
|
|
641
|
+
address: this.formattedAddress ? this.formattedAddress : null,
|
|
642
|
+
});
|
|
643
|
+
}, this.handleLocationError.bind(this));
|
|
644
|
+
}
|
|
645
|
+
else {
|
|
646
|
+
salla.log('Geolocation is not supported by this browser.');
|
|
647
|
+
this.geolocationError = true;
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
handleLocationError(error) {
|
|
651
|
+
this.geolocationError = true;
|
|
652
|
+
switch (error.code) {
|
|
653
|
+
case error.PERMISSION_DENIED:
|
|
654
|
+
salla.log('User denied the request for Geolocation.');
|
|
655
|
+
break;
|
|
656
|
+
case error.POSITION_UNAVAILABLE:
|
|
657
|
+
salla.log('Location information is unavailable.');
|
|
658
|
+
break;
|
|
659
|
+
case error.TIMEOUT:
|
|
660
|
+
salla.log('The request to get user location timed out.');
|
|
661
|
+
break;
|
|
662
|
+
case error.UNKNOWN_ERROR:
|
|
663
|
+
salla.log('An unknown error occurred.');
|
|
664
|
+
break;
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
componentDidLoad() {
|
|
668
|
+
this.syncMapInputValue();
|
|
669
|
+
// if lat and lng provided then get the formatted address
|
|
670
|
+
if (this.hasCoordinate(this.lat) && this.hasCoordinate(this.lng)) {
|
|
671
|
+
// get address
|
|
672
|
+
fetch(`https://maps.googleapis.com/maps/api/geocode/json?latlng=${this.lat},${this.lng}&key=${this.apiKey}&language=${salla.config.get('user.language_code') ||
|
|
673
|
+
document.documentElement.lang ||
|
|
674
|
+
'ar'}`)
|
|
675
|
+
.then(res => res.json())
|
|
676
|
+
.then(res => {
|
|
677
|
+
if (res.status === 'OK') {
|
|
678
|
+
this.formattedAddress = res.results[0].formatted_address;
|
|
679
|
+
this.searchInputValue = res.results[0].formatted_address;
|
|
680
|
+
if (this.searchInput) {
|
|
681
|
+
this.searchInput.value = res.results[0].formatted_address;
|
|
682
|
+
}
|
|
683
|
+
this.selectedLng = this.lng;
|
|
684
|
+
this.selectedLat = this.lat;
|
|
685
|
+
this.syncMapInputValue();
|
|
686
|
+
}
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
this.mapInput.addEventListener('invalid', e => {
|
|
690
|
+
// Keep native constraint validation, but move focus to the visible control
|
|
691
|
+
// so Chromium does not throw "An invalid form control is not focusable".
|
|
692
|
+
e.preventDefault();
|
|
693
|
+
this.host.classList.add('s-has-error');
|
|
694
|
+
this.focusLocateControl();
|
|
695
|
+
this.invalidInput.emit(e);
|
|
696
|
+
});
|
|
697
|
+
this.mapInput.addEventListener('input', () => {
|
|
698
|
+
this.mapInput.setCustomValidity('');
|
|
699
|
+
this.host.classList.remove('s-has-error');
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
/**
|
|
703
|
+
* Validate the selected location when the field is required.
|
|
704
|
+
* Native required still applies on a focusable visually-hidden input; this method
|
|
705
|
+
* syncs value first and routes focus to the visible locate control via `invalid`.
|
|
706
|
+
*/
|
|
707
|
+
async reportValidity() {
|
|
708
|
+
this.syncMapInputValue();
|
|
709
|
+
if (!this.mapInput || !this.required || this.readonly || this.getLatLng()) {
|
|
710
|
+
this.mapInput?.setCustomValidity('');
|
|
711
|
+
this.host.classList.remove('s-has-error');
|
|
712
|
+
return true;
|
|
713
|
+
}
|
|
714
|
+
return this.mapInput.reportValidity();
|
|
715
|
+
}
|
|
716
|
+
/**
|
|
717
|
+
* Open location component
|
|
718
|
+
*/
|
|
719
|
+
async open() {
|
|
720
|
+
// only init google maps on modal open :) to save resources
|
|
721
|
+
if (!this.map)
|
|
722
|
+
this.initGoogleMaps({
|
|
723
|
+
libraries: this.searchable ? ['places', 'search'] : [],
|
|
724
|
+
language: salla.config.get('user.language_code') ||
|
|
725
|
+
document.documentElement.lang ||
|
|
726
|
+
'ar',
|
|
727
|
+
}, this.mapElement);
|
|
728
|
+
return await this.locationModal.open();
|
|
729
|
+
}
|
|
730
|
+
// rendering functions
|
|
731
|
+
getLocationModal() {
|
|
732
|
+
return (h("div", null, h("div", { class: "s-map-modal-title" }, !!this.modalTitle ? this.modalTitle : this.modalActivityTitle), h("div", { class: "s-map-modal-body" }, h("div", { class: "s-map-element", ref: el => (this.mapElement = el) }), this.readonly ? "" :
|
|
733
|
+
[
|
|
734
|
+
this.searchable && (h("div", { class: "s-map-search-wrapper" }, h("input", { class: "s-map-search-input", ref: el => (this.searchInput = el), placeholder: this.searchPlaceholder }))),
|
|
735
|
+
h("salla-button", { class: "s-map-my-location-button", onClick: () => {
|
|
736
|
+
this.getCurrentLocation();
|
|
737
|
+
}, shape: "icon", color: "primary" }, h("span", { innerHTML: CurrentLocation })),
|
|
738
|
+
h("salla-button", { class: "s-map-submit-button", color: "primary", width: "wide", onClick: () => {
|
|
739
|
+
let points = {
|
|
740
|
+
lat: this.lat,
|
|
741
|
+
lng: this.lng,
|
|
742
|
+
address: this.formattedAddress ? this.formattedAddress : null,
|
|
743
|
+
};
|
|
744
|
+
salla.event.emit('salla-map::selected', points);
|
|
745
|
+
this.selected.emit(points);
|
|
746
|
+
this.selectedLat = points.lat;
|
|
747
|
+
this.selectedLng = points.lng;
|
|
748
|
+
this.getPositionAddress(new google.maps.LatLng(points.lat, points.lng), true);
|
|
749
|
+
this.syncMapInputValue();
|
|
750
|
+
this.host.classList.remove('s-has-error');
|
|
751
|
+
this.mapInput.dispatchEvent(new window.Event('change', { bubbles: true }));
|
|
752
|
+
this.locationModal.close();
|
|
753
|
+
} }, this.confirmButtonTitle)
|
|
754
|
+
])));
|
|
755
|
+
}
|
|
756
|
+
// render
|
|
757
|
+
render() {
|
|
758
|
+
return (h(Host, { key: '20ed1a1d4099e817164c3764341d473c1b735add', class: "s-map-wrapper" }, h("salla-modal", { key: '77309d82d11bbae677a935aef0e02588c5f9fbfa', class: "s-map-modal-wrapper", noPadding: true, ref: modal => {
|
|
759
|
+
this.locationModal = modal;
|
|
760
|
+
} }, this.getLocationModal()), h("slot", { key: '57e6d352f42a3321a98925dd4136eaf0fdbb06b0', name: "button" }, h("salla-button", { key: 'a0c39395b18ca41f2ea31c5c5729b2ba20c17a16', onClick: () => {
|
|
761
|
+
this.open();
|
|
762
|
+
}, color: "primary", class: "s-map-location-button" }, h("span", { key: 'b9478a06c198812edeacab794fb63699ea72fd6b', class: "s-map-location-icon", innerHTML: this.formattedAddress ? Edit : Location }), this.formattedAddress ? (h("div", null, this.locateButtonEdit, " | ", this.formatAddress(this.formattedAddress))) : (this.locateButtonTitle))), h("input", { key: 'd1619a934c72218d4d00b651e95743ad8d14a7a2', class: "s-map-value-input", name: this.name, required: this.required, value: this.getLatLng(), tabIndex: -1, "aria-hidden": "true", ref: input => (this.mapInput = input) })));
|
|
763
|
+
}
|
|
764
|
+
get host() { return getElement(this); }
|
|
765
|
+
};
|
|
766
|
+
SallaMap.style = sallaMapCss;
|
|
767
|
+
|
|
768
|
+
const sallaProgressBarCss = "/*!twlt*/.s-progress-bar-container{margin-bottom:0.625rem}.s-progress-bar-header{margin-bottom:0.375rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-progress-bar-target-section{margin-bottom:0.625rem;display:flex;justify-content:space-between;font-size:0.875rem;line-height:1.25rem}.s-progress-bar-wrapper{margin-bottom:0.375rem;width:100%;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.s-progress-bar-wrapper:is(.dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.s-progress-bar-progress{height:100%;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.s-progress-bar-message{margin-bottom:0.625rem;display:block;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.s-progress-bar-wrapper .s-progress-bar-progress-stripped{background-image:linear-gradient(-45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%,rgba(255, 255, 255, .2) 50%,rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);background-size:30px 30px}.s-reviews-summary-progress .s-progress-bar-wrapper{margin-bottom:0px}.s-reviews-summary-progress .s-progress-bar-container{margin-bottom:0px}";
|
|
769
|
+
|
|
770
|
+
const SallaProgressBar = class {
|
|
771
|
+
constructor(hostRef) {
|
|
772
|
+
registerInstance(this, hostRef);
|
|
773
|
+
/**
|
|
774
|
+
* Set height for the wrapper.
|
|
775
|
+
*/
|
|
776
|
+
this.height = "10px";
|
|
777
|
+
try {
|
|
778
|
+
if (this.donation) {
|
|
779
|
+
let donationJson = typeof this.donation == 'string' ? JSON.parse(this.donation) : this.donation;
|
|
780
|
+
if (donationJson.can_donate && donationJson.target_amount) {
|
|
781
|
+
donationJson.target_end_date = donationJson.target_end_date == '0000-00-00' ? null : donationJson.target_end_date;
|
|
782
|
+
this.value = donationJson.collected_amount;
|
|
783
|
+
this.target = donationJson.target_amount;
|
|
784
|
+
this.header = salla.lang.get('pages.products.target');
|
|
785
|
+
this.message = donationJson.target_end_date ? salla.lang.get('pages.products.donation_target_date') + ' ' + donationJson.target_end_date : '';
|
|
786
|
+
}
|
|
787
|
+
else {
|
|
788
|
+
//in case the product is not enabled target campaign
|
|
789
|
+
this.message = donationJson.target_amount
|
|
790
|
+
? donationJson.target_message
|
|
791
|
+
: '';
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
catch (e) {
|
|
796
|
+
salla.log('Wrong donation json');
|
|
797
|
+
}
|
|
798
|
+
salla.lang.onLoaded(() => {
|
|
799
|
+
this.header = this.header?.replace('pages.products.target', salla.lang.get('pages.products.target'));
|
|
800
|
+
this.message = this.message?.replace('pages.products.donation_target_date', salla.lang.get('pages.products.donation_target_date'));
|
|
801
|
+
});
|
|
802
|
+
salla.onReady(() => {
|
|
803
|
+
this.color = this.color || salla.config.get('theme.color.primary', "#ffd5c4");
|
|
804
|
+
if (!this.unit) {
|
|
805
|
+
this.unit = salla.config.currency().symbol;
|
|
806
|
+
}
|
|
807
|
+
});
|
|
808
|
+
}
|
|
809
|
+
getPercentage() {
|
|
810
|
+
return (this.value / this.target) * 100;
|
|
811
|
+
}
|
|
812
|
+
render() {
|
|
813
|
+
if (!this.target && !this.message) {
|
|
814
|
+
return '';
|
|
815
|
+
}
|
|
816
|
+
return (h("div", { class: "s-progress-bar-container" }, this.header ? h("div", { class: "s-progress-bar-header" }, this.header) : '', this.getProgressBar(), this.message ? h("span", { class: "s-progress-bar-message" }, this.message) : ''));
|
|
817
|
+
}
|
|
818
|
+
getProgressBar() {
|
|
819
|
+
return this.target ? [
|
|
820
|
+
!this.hideUnits ? (h("div", { class: "s-progress-bar-target-section" }, h("span", { innerHTML: `${salla.helpers.number(this.value)} ${this.unit}` }), h("span", { innerHTML: `${salla.helpers.number(this.target)} ${this.unit}` }))) : null,
|
|
821
|
+
h("div", { class: "s-progress-bar-wrapper", style: { height: this.height } }, h("div", { class: {
|
|
822
|
+
"s-progress-bar-progress": true,
|
|
823
|
+
's-progress-bar-progress-stripped': this.stripped
|
|
824
|
+
}, style: {
|
|
825
|
+
width: `${this.getPercentage()}%`,
|
|
826
|
+
backgroundColor: this.color
|
|
827
|
+
} }))
|
|
828
|
+
] : null;
|
|
829
|
+
}
|
|
830
|
+
};
|
|
831
|
+
SallaProgressBar.style = sallaProgressBarCss;
|
|
832
|
+
|
|
7
833
|
/**
|
|
8
834
|
* SSR Window 5.0.1
|
|
9
835
|
* Better handling for window object in SSR environment
|
|
@@ -10429,4 +11255,4 @@ const SallaSlider = class {
|
|
|
10429
11255
|
};
|
|
10430
11256
|
SallaSlider.style = sallaSliderCss;
|
|
10431
11257
|
|
|
10432
|
-
export { SallaSlider as salla_slider };
|
|
11258
|
+
export { SallaMap as salla_map, SallaProgressBar as salla_progress_bar, SallaSlider as salla_slider };
|