@salla.sa/twilight-components 2.14.466 → 2.14.468
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-ChLzVjJY.js → filepond-C1SAyrFq.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-CsFmGjnc.js → filepond-plugin-file-poster-DAhQ7rGa.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-CHsUG4Ey.js → filepond-plugin-file-validate-size-qfwxpApK.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-BcOZG5x6.js → filepond-plugin-file-validate-type-BbYanfPf.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-Cq0bUS7X.js → filepond-plugin-image-edit-lWdFhMNt.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-D6e7ezt-.js → filepond-plugin-image-exif-orientation-C2wUYBSb.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-B0fvWDqM.js → filepond-plugin-image-preview-B1ukjrjT.js} +1 -1
- package/dist/cjs/{functions-DQkYfvtq.js → functions-DCSgyun2.js} +1 -1
- package/dist/cjs/{index-DTSWXcbN.js → index-CXr_39D8.js} +9 -5
- package/dist/cjs/{index-MaPhQdOr.js → index-D3oJJZKW.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{mail-Bgvt2hc9.js → mail-C9D8MHae.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 +29 -84
- 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 +11 -11
- package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +91 -7
- 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-cashback-banner.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 +3 -3
- 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 +63 -28
- 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 +32 -2
- package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +4 -4
- package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
- 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-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-next-order-coupon.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card-embed.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 +259 -64
- package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +3 -3
- package/dist/cjs/salla-rating-modal.cjs.entry.js +3 -3
- 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 +252 -32
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +4 -4
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/salla-verify.cjs.entry.js +3 -3
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +329 -0
- package/dist/cjs/{tracked-promise-ePwPYqjc.js → tracked-promise-BsYRgTGD.js} +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-l24zONcP.js → vanilla-picker-DkdzTjSC.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +90 -6
- package/dist/collection/components/salla-gifting/salla-gifting.js +69 -29
- package/dist/collection/components/salla-login-modal/salla-login-modal.js +31 -1
- package/dist/collection/components/salla-product-options/salla-product-options.css +0 -3
- package/dist/collection/components/salla-product-options/salla-product-options.js +28 -84
- package/dist/collection/components/salla-products-list/salla-products-list.css +76 -0
- package/dist/collection/components/salla-products-list/salla-products-list.js +387 -65
- package/dist/collection/components/salla-social-share/salla-social-share.css +161 -0
- package/dist/collection/components/salla-social-share/salla-social-share.js +316 -50
- package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
- package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
- package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
- package/dist/collection/components/salla-wishlist-actions/salla-wishlist-actions.css +65 -0
- package/dist/collection/components/salla-wishlist-actions/salla-wishlist-actions.js +432 -0
- package/dist/components/index.js +5 -5
- package/dist/components/salla-bullet-delivery.js +90 -6
- package/dist/components/salla-gifting.js +63 -27
- package/dist/components/salla-login-modal2.js +31 -1
- package/dist/components/salla-product-options2.js +28 -84
- package/dist/components/salla-products-list2.js +266 -64
- package/dist/components/salla-social-share.js +1 -189
- package/dist/components/salla-social-share2.js +420 -0
- package/dist/components/salla-tab-content2.js +1 -1
- package/dist/components/salla-tab-header2.js +1 -1
- package/dist/components/salla-tabs2.js +1 -1
- package/dist/components/salla-tel-input2.js +1 -1
- package/dist/components/salla-tooltip2.js +1 -1
- package/dist/components/salla-user-settings.js +1 -1
- package/dist/components/salla-wishlist-actions.d.ts +11 -0
- package/dist/components/salla-wishlist-actions.js +375 -0
- package/dist/esm/{filepond-C8Bwo-02.js → filepond-C4pZr9nR.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-Bx3Pf2Jt.js → filepond-plugin-file-poster-CXpAGxT4.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-B855u7Nl.js → filepond-plugin-file-validate-size-Dk4M6ge1.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-Bi5ftj6I.js → filepond-plugin-file-validate-type-DD7qvRsg.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-BDsvflVi.js → filepond-plugin-image-edit-DMllAEkg.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-CIBvl9lW.js → filepond-plugin-image-exif-orientation-BRCbcu_E.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-iKOdvH4g.js → filepond-plugin-image-preview-DgeylrwN.js} +1 -1
- package/dist/esm/{functions-Bc7BItqP.js → functions-DrS7by6t.js} +1 -1
- package/dist/esm/{index-TDIoPT-F.js → index-9SnsJoYO.js} +1 -1
- package/dist/esm/{index-B4SEH_Fg.js → index-D2yBy7Jh.js} +9 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{mail-DLNIOD9t.js → mail-DzAIgzdz.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 +29 -84
- 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 +11 -11
- package/dist/esm/salla-bullet-delivery_2.entry.js +91 -7
- 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-cashback-banner.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 +3 -3
- 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 +63 -28
- 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 +32 -2
- package/dist/esm/salla-loyalty-banner.entry.js +2 -2
- package/dist/esm/salla-loyalty-hero_2.entry.js +4 -4
- package/dist/esm/salla-loyalty-panel.entry.js +3 -3
- 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-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-next-order-coupon.entry.js +1 -1
- package/dist/esm/salla-notification-item.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer-modal.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-branch.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-placeholder.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-product-card-embed.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 +259 -64
- package/dist/esm/salla-progress-bar.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +3 -3
- package/dist/esm/salla-rating-modal.entry.js +3 -3
- 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 +252 -32
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tab-content_3.entry.js +4 -4
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/salla-verify.entry.js +3 -3
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/salla-wishlist-actions.entry.js +327 -0
- package/dist/esm/{tracked-promise-DJMfgq3q.js → tracked-promise-CTcAqNfZ.js} +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-BZ3Kpnm6.js → vanilla-picker-DfeK45Yv.js} +1 -1
- package/dist/twilight/{p-7a144cce.entry.js → p-07af3286.entry.js} +1 -1
- package/dist/twilight/{p-08fa3250.entry.js → p-08337b2b.entry.js} +1 -1
- package/dist/twilight/{p-c4a2f0c4.entry.js → p-08771dff.entry.js} +1 -1
- package/dist/twilight/{p-63b6ff19.entry.js → p-0e1bab4f.entry.js} +1 -1
- package/dist/twilight/{p-a94c8805.entry.js → p-0eadca17.entry.js} +1 -1
- package/dist/twilight/{p-92ecbfb3.entry.js → p-12ccc1ab.entry.js} +1 -1
- package/dist/twilight/{p-d1be0cf0.entry.js → p-1574176e.entry.js} +1 -1
- package/dist/twilight/{p-b1c9125f.entry.js → p-17015f9c.entry.js} +1 -1
- package/dist/twilight/{p-f4326883.entry.js → p-1920b702.entry.js} +1 -1
- package/dist/twilight/{p-65cc4abf.entry.js → p-1a1cebfa.entry.js} +1 -1
- package/dist/twilight/{p-b22966df.entry.js → p-1a844fda.entry.js} +1 -1
- package/dist/twilight/{p-1beccaa5.entry.js → p-1b7ebf47.entry.js} +1 -1
- package/dist/twilight/{p-999abe04.entry.js → p-223d7ceb.entry.js} +1 -1
- package/dist/twilight/{p-b99ecd2c.entry.js → p-255f5d2a.entry.js} +1 -1
- package/dist/twilight/{p-077c5ae5.entry.js → p-266f57de.entry.js} +1 -1
- package/dist/twilight/p-28bdf8ec.entry.js +4 -0
- package/dist/twilight/{p-089507be.entry.js → p-2c7086ec.entry.js} +1 -1
- package/dist/twilight/{p-fe6a634f.entry.js → p-2c7f524a.entry.js} +1 -1
- package/dist/twilight/{p-ac91aa4f.entry.js → p-30ea9a82.entry.js} +1 -1
- package/dist/twilight/{p-0beaf6f8.entry.js → p-313d38cd.entry.js} +1 -1
- package/dist/twilight/{p-70658c1a.entry.js → p-315ce27b.entry.js} +1 -1
- package/dist/twilight/p-378d45e2.entry.js +4 -0
- package/dist/twilight/{p-96489529.entry.js → p-3c2fe8cd.entry.js} +1 -1
- package/dist/twilight/{p-3b416cdd.entry.js → p-3d1e7982.entry.js} +1 -1
- package/dist/twilight/{p-7e0bfa67.entry.js → p-3d7c0ac6.entry.js} +1 -1
- package/dist/twilight/{p-3e9fb046.entry.js → p-3d8d289e.entry.js} +1 -1
- package/dist/twilight/{p-c5b5162c.entry.js → p-4144c908.entry.js} +1 -1
- package/dist/twilight/{p-f4a5521e.entry.js → p-453a7bb2.entry.js} +1 -1
- package/dist/twilight/{p-7a238d37.entry.js → p-4c457ba5.entry.js} +1 -1
- package/dist/twilight/{p-d33fe4fe.entry.js → p-4d3bcacd.entry.js} +1 -1
- package/dist/twilight/{p-53c1a65f.entry.js → p-4dedb514.entry.js} +1 -1
- package/dist/twilight/{p-eebe55bd.entry.js → p-50dfec0a.entry.js} +1 -1
- package/dist/twilight/{p-72627a5b.entry.js → p-53f83426.entry.js} +1 -1
- package/dist/twilight/{p-20bed966.entry.js → p-54e9ac89.entry.js} +1 -1
- package/dist/twilight/{p-20b24e22.entry.js → p-571b8e00.entry.js} +1 -1
- package/dist/twilight/{p-7e0f8832.entry.js → p-5a5057a8.entry.js} +1 -1
- package/dist/twilight/{p-5817d5db.entry.js → p-5a9b94f8.entry.js} +1 -1
- package/dist/twilight/{p-ac2979bf.entry.js → p-5c1c520a.entry.js} +1 -1
- package/dist/twilight/{p-649cca57.entry.js → p-5d06fe77.entry.js} +1 -1
- package/dist/twilight/{p-eb7e08dd.entry.js → p-5e433652.entry.js} +1 -1
- package/dist/twilight/{p-c605f897.entry.js → p-6046666d.entry.js} +1 -1
- package/dist/twilight/{p-ace778dd.entry.js → p-67e23040.entry.js} +1 -1
- package/dist/twilight/{p-0c721c37.entry.js → p-6c777951.entry.js} +1 -1
- package/dist/twilight/{p-aaf77847.entry.js → p-749dbf27.entry.js} +1 -1
- package/dist/twilight/p-7bd464f3.entry.js +4 -0
- package/dist/twilight/{p-88a26183.entry.js → p-7ffc1711.entry.js} +1 -1
- package/dist/twilight/{p-173638ad.entry.js → p-83b6c374.entry.js} +1 -1
- package/dist/twilight/{p-83f3fe92.entry.js → p-8b5d26d3.entry.js} +1 -1
- package/dist/twilight/{p-46efd843.entry.js → p-9a0514dd.entry.js} +1 -1
- package/dist/twilight/{p-a8a43d8f.entry.js → p-9ba953ab.entry.js} +1 -1
- package/dist/twilight/{p-BhwNzoAX.js → p-BGpAIcg-.js} +1 -1
- package/dist/twilight/{p-DqcHIrMk.js → p-BHkz1ssL.js} +1 -1
- package/dist/twilight/{p-DCiLQw-U.js → p-BZhp8a87.js} +1 -1
- package/dist/twilight/{p-1GhsZ-y0.js → p-Bo1nXenO.js} +1 -1
- package/dist/twilight/{p-B8tpOftS.js → p-BojnM4VS.js} +1 -1
- package/dist/twilight/{p-CzKuXgcx.js → p-CBU9I-zy.js} +1 -1
- package/dist/twilight/{p-BPrbqbi4.js → p-CGd7EQZr.js} +1 -1
- package/dist/twilight/p-D01LipFK.js +9 -0
- package/dist/twilight/{p-B4SEH_Fg.js → p-D2yBy7Jh.js} +2 -2
- package/dist/twilight/{p-Bol9M57m.js → p-DSgSJMud.js} +2 -2
- package/dist/twilight/{p-DLNIOD9t.js → p-DzAIgzdz.js} +1 -1
- package/dist/twilight/{p-26ff2da1.entry.js → p-a0d88c4d.entry.js} +1 -1
- package/dist/twilight/{p-7f8b4a78.entry.js → p-a2b53a52.entry.js} +1 -1
- package/dist/twilight/{p-c360bc76.entry.js → p-a3e1fafc.entry.js} +1 -1
- package/dist/twilight/{p-204b9c34.entry.js → p-a463d567.entry.js} +1 -1
- package/dist/twilight/{p-39e531f4.entry.js → p-a6a9e398.entry.js} +1 -1
- package/dist/twilight/{p-5a8e7bb9.entry.js → p-a79f60e6.entry.js} +1 -1
- package/dist/twilight/{p-36528e88.entry.js → p-aadfd70e.entry.js} +1 -1
- package/dist/twilight/{p-7dc4a6ce.entry.js → p-ad0a27e2.entry.js} +1 -1
- package/dist/twilight/{p-2a1c12f9.entry.js → p-ae8bd2e7.entry.js} +1 -1
- package/dist/twilight/{p-50b92803.entry.js → p-af121bbf.entry.js} +1 -1
- package/dist/twilight/p-b0f28806.entry.js +4 -0
- package/dist/twilight/{p-7c46d055.entry.js → p-b3f6b725.entry.js} +1 -1
- package/dist/twilight/{p-e0e8b5ee.entry.js → p-b7e720e8.entry.js} +1 -1
- package/dist/twilight/{p-19748525.entry.js → p-b80016c8.entry.js} +1 -1
- package/dist/twilight/{p-19afb593.entry.js → p-c0f40eea.entry.js} +1 -1
- package/dist/twilight/p-c4bc10c1.entry.js +4 -0
- package/dist/twilight/{p-6bf44c4f.entry.js → p-c637b6bb.entry.js} +1 -1
- package/dist/twilight/{p-afb4ffe9.entry.js → p-c6e18746.entry.js} +1 -1
- package/dist/twilight/{p-a0433089.entry.js → p-cb855cb3.entry.js} +1 -1
- package/dist/twilight/{p-88c110ae.entry.js → p-cbc44b3e.entry.js} +1 -1
- package/dist/twilight/{p-d98c3e96.entry.js → p-cbf547f0.entry.js} +1 -1
- package/dist/twilight/{p-78cc1984.entry.js → p-cebad615.entry.js} +1 -1
- package/dist/twilight/{p-0abda719.entry.js → p-cfd910a8.entry.js} +1 -1
- package/dist/twilight/{p-a366dff0.entry.js → p-d0a8b9be.entry.js} +1 -1
- package/dist/twilight/{p-921b23fc.entry.js → p-d0cae7da.entry.js} +1 -1
- package/dist/twilight/{p-47df8f81.entry.js → p-d861eea6.entry.js} +1 -1
- package/dist/twilight/p-daa9c0b3.entry.js +4 -0
- package/dist/twilight/{p-7310af57.entry.js → p-db43fa93.entry.js} +1 -1
- package/dist/twilight/{p-83beb2f7.entry.js → p-e06a7e19.entry.js} +1 -1
- package/dist/twilight/{p-6fb05a50.entry.js → p-e34f68e0.entry.js} +1 -1
- package/dist/twilight/{p-5647ab30.entry.js → p-e4cac2a9.entry.js} +1 -1
- package/dist/twilight/{p-9f817867.entry.js → p-e5de1833.entry.js} +1 -1
- package/dist/twilight/{p-61bbcb2e.entry.js → p-e80ee5b0.entry.js} +2 -2
- package/dist/twilight/{p-42523f08.entry.js → p-e8ffc069.entry.js} +1 -1
- package/dist/twilight/{p-1027f1df.entry.js → p-ee8c7a5a.entry.js} +1 -1
- package/dist/twilight/{p-6667d7e9.entry.js → p-f0dedf42.entry.js} +1 -1
- package/dist/twilight/{p-fc2c74e3.entry.js → p-f3a01895.entry.js} +1 -1
- package/dist/twilight/{p-e0bafef7.entry.js → p-fb56a444.entry.js} +1 -1
- package/dist/twilight/{p-02dac67d.entry.js → p-fe1bced4.entry.js} +1 -1
- package/dist/twilight/{p-Cip0ZIcP.js → p-paiaALkJ.js} +1 -1
- package/dist/twilight/{p-BNurXH-d.js → p-xz8gqXL9.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-bullet-delivery/salla-bullet-delivery.d.ts +16 -0
- package/dist/types/components/salla-gifting/gift-schema.d.ts +4 -0
- package/dist/types/components/salla-gifting/salla-gifting.d.ts +4 -1
- package/dist/types/components/salla-login-modal/salla-login-modal.d.ts +2 -0
- package/dist/types/components/salla-product-options/salla-product-options.d.ts +0 -11
- package/dist/types/components/salla-products-list/salla-products-list.d.ts +60 -6
- package/dist/types/components/salla-social-share/salla-social-share.d.ts +39 -2
- package/dist/types/components/salla-wishlist-actions/salla-wishlist-actions.d.ts +93 -0
- package/dist/types/components.d.ts +172 -18
- package/package.json +5 -5
- package/dist/twilight/p-6020ddec.entry.js +0 -4
- package/dist/twilight/p-645254eb.entry.js +0 -4
- package/dist/twilight/p-99a57ad1.entry.js +0 -4
- package/dist/twilight/p-BnjD0Cne.js +0 -9
- package/dist/twilight/p-b3456579.entry.js +0 -4
- package/dist/twilight/p-d19c0be3.entry.js +0 -4
|
@@ -1,195 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
import { a as anime } from './anime.es.js';
|
|
6
|
-
import { f as facebook, t as twitter } from './facebook.js';
|
|
7
|
-
import { M as MailIcon } from './mail.js';
|
|
8
|
-
import { C as Cancel } from './cancel.js';
|
|
9
|
-
import { d as defineCustomElement$2 } from './salla-button2.js';
|
|
10
|
-
|
|
11
|
-
var copy_link = `<!-- Generated by IcoMoon.io -->
|
|
12
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
13
|
-
<title>link</title>
|
|
14
|
-
<path d="M19.247 23.019l-4.189 4.189c-2.831 2.831-7.435 2.831-10.265 0-1.371-1.372-2.125-3.193-2.125-5.132s0.755-3.761 2.125-5.133l4.189-4.191c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.521-1.885 0l-4.189 4.191c-1.875 1.875-2.907 4.367-2.907 7.019s1.032 5.143 2.907 7.017 4.368 2.907 7.019 2.907 5.143-1.032 7.017-2.908l4.189-4.189c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.52-1.885 0.001zM22.276 9.724c-0.521-0.521-1.364-0.521-1.885 0l-10.667 10.667c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l10.667-10.667c0.521-0.521 0.521-1.364 0-1.885zM29.093 2.908c-1.875-1.876-4.368-2.908-7.019-2.908s-5.143 1.032-7.017 2.908l-4.189 4.188c-0.521 0.521-0.521 1.364 0 1.885s1.364 0.521 1.885 0l4.189-4.189c2.831-2.831 7.435-2.831 10.265 0 1.371 1.372 2.125 3.193 2.125 5.132s-0.755 3.761-2.125 5.133l-4.189 4.191c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l4.189-4.191c1.875-1.875 2.907-4.367 2.907-7.019s-1.032-5.143-2.907-7.016z"></path>
|
|
15
|
-
</svg>
|
|
16
|
-
`;
|
|
17
|
-
|
|
18
|
-
var whatsapp = `<!-- Generated by IcoMoon.io -->
|
|
19
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
20
|
-
<title>whatsapp</title>
|
|
21
|
-
<path d="M16 32c-0.008 0-0.018 0-0.028 0-3.1 0-5.993-0.887-8.439-2.421l0.066 0.039-7.2 2.3 2.336-6.964c-1.713-2.492-2.736-5.575-2.736-8.897 0-0.020 0-0.040 0-0.060v0.003c0.009-8.833 7.167-15.991 15.999-16h0.001c8.837 0 16 7.163 16 16s-7.163 16-16 16v0zM7.906 27.424l0.4 0.264c2.169 1.449 4.837 2.312 7.707 2.312 7.732 0 14-6.268 14-14s-6.268-14-14-14c-0.004 0-0.009 0-0.013 0h0.001c-7.729 0.008-13.992 6.271-14 13.999v0.001c-0 0.010-0 0.021-0 0.032 0 3.072 1 5.909 2.693 8.206l-0.027-0.038 0.304 0.416-1.4 4.2zM20.716 24.958c-1.684-0.131-3.237-0.574-4.641-1.271l0.073 0.033c-3.098-1.456-5.634-3.668-7.438-6.405l-0.042-0.067c-1.102-1.357-1.819-3.067-1.962-4.938l-0.002-0.030c-0.001-0.036-0.001-0.078-0.001-0.12 0-1.575 0.66-2.995 1.719-4l0.002-0.002c0.547-0.52 1.289-0.839 2.105-0.839 0.033 0 0.066 0.001 0.099 0.002l-0.005-0c0.2 0 0.378 0 0.542 0.018 0.016-0.001 0.035-0.001 0.054-0.001 0.815 0 1.502 0.549 1.711 1.298l0.003 0.012 0.324 0.782c0.376 0.906 0.858 2.068 0.942 2.244 0.144 0.251 0.23 0.552 0.23 0.873 0 0.286-0.068 0.557-0.188 0.797l0.005-0.010c-0.149 0.307-0.332 0.57-0.55 0.802l0.002-0.002c-0.148 0.168-0.248 0.274-0.346 0.378s-0.172 0.18-0.26 0.284c0.575 0.92 1.237 1.713 1.992 2.406l0.008 0.008c0.829 0.758 1.802 1.373 2.872 1.8l0.064 0.022c0.369-0.266 0.672-0.6 0.896-0.985l0.008-0.015 0.174-0.232c0.328-0.484 0.875-0.798 1.495-0.798 0.249 0 0.487 0.051 0.703 0.142l-0.012-0.004c0.492 0.168 2.922 1.372 2.946 1.384l0.228 0.11c0.415 0.149 0.758 0.417 0.996 0.763l0.004 0.007c0.107 0.349 0.169 0.75 0.169 1.166 0 0.591-0.125 1.153-0.349 1.661l0.010-0.026c-0.702 1.368-1.983 2.353-3.511 2.637l-0.031 0.005c-0.309 0.071-0.663 0.112-1.028 0.112-0.004 0-0.007 0-0.011 0h0.001zM10.632 9.318c-0.028-0.002-0.062-0.004-0.095-0.004-0.245 0-0.472 0.076-0.659 0.206l0.004-0.002c-0.726 0.651-1.18 1.591-1.18 2.638 0 0.044 0.001 0.087 0.002 0.13l-0-0.006c0.122 1.404 0.662 2.662 1.495 3.671l-0.009-0.011 0.12 0.168c1.627 2.491 3.865 4.46 6.504 5.723l0.096 0.041c3.136 1.288 3.916 1.124 4.426 1.014 0.87-0.159 1.601-0.656 2.067-1.347l0.007-0.011c0.12-0.316 0.204-0.682 0.237-1.063l0.001-0.015-0.040-0.018-0.256-0.124c-0.8-0.4-2.46-1.2-2.734-1.292l-0.058 0.184c-0.346 0.501-0.684 0.934-1.045 1.347l0.015-0.017c-0.344 0.349-0.821 0.565-1.349 0.565-0.28 0-0.546-0.061-0.785-0.17l0.012 0.005c-1.403-0.547-2.609-1.301-3.646-2.239l0.010 0.009c-0.975-0.891-1.81-1.912-2.486-3.039l-0.034-0.061c-0.152-0.244-0.242-0.54-0.242-0.857 0-0.463 0.191-0.88 0.499-1.178l0-0c0.13-0.162 0.264-0.302 0.4-0.444l0.236-0.256c0.091-0.096 0.177-0.201 0.254-0.311l0.006-0.009c-0.158-0.36-0.622-1.472-0.988-2.352l-0.322-0.772-0.038-0.086c-0.188-0.010-0.302-0.016-0.426-0.016zM12.462 12.442v0.012z"></path>
|
|
22
|
-
</svg>
|
|
23
|
-
`;
|
|
24
|
-
|
|
25
|
-
var Socials;
|
|
26
|
-
(function (Socials) {
|
|
27
|
-
Socials["FACEBOOK"] = "facebook";
|
|
28
|
-
Socials["TWITTER"] = "twitter";
|
|
29
|
-
Socials["WHATSAPP"] = "whatsapp";
|
|
30
|
-
Socials["EMAIL"] = "email";
|
|
31
|
-
Socials["COPY_LINK"] = "copy_link";
|
|
32
|
-
})(Socials || (Socials = {}));
|
|
33
|
-
|
|
34
|
-
var ShareAlt = `<!-- Generated by IcoMoon.io -->
|
|
35
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
36
|
-
<title>share-alt</title>
|
|
37
|
-
<path d="M26.667 21.333c-1.699 0-3.196 0.812-4.173 2.052l-11.912-5.211c0.044-0.276 0.085-0.553 0.085-0.841 0-0.472-0.081-0.923-0.197-1.359l12.361-6.952c0.971 1.009 2.328 1.644 3.836 1.644 2.941 0 5.333-2.392 5.333-5.333s-2.392-5.333-5.333-5.333-5.333 2.392-5.333 5.333c0 0.472 0.081 0.923 0.197 1.359l-12.361 6.952c-0.971-1.009-2.328-1.644-3.836-1.644-2.941 0-5.333 2.392-5.333 5.333s2.392 5.333 5.333 5.333c1.699 0 3.196-0.812 4.173-2.052l11.912 5.211c-0.044 0.276-0.085 0.553-0.085 0.841 0 2.941 2.392 5.333 5.333 5.333s5.333-2.392 5.333-5.333-2.392-5.333-5.333-5.333zM26.667 2.667c1.471 0 2.667 1.196 2.667 2.667s-1.196 2.667-2.667 2.667-2.667-1.196-2.667-2.667 1.196-2.667 2.667-2.667zM5.333 20c-1.471 0-2.667-1.196-2.667-2.667s1.196-2.667 2.667-2.667 2.667 1.196 2.667 2.667-1.196 2.667-2.667 2.667zM26.667 29.333c-1.471 0-2.667-1.196-2.667-2.667s1.196-2.667 2.667-2.667 2.667 1.196 2.667 2.667-1.196 2.667-2.667 2.667z"></path>
|
|
38
|
-
</svg>
|
|
39
|
-
`;
|
|
40
|
-
|
|
41
|
-
const sallaSocialShareCss = "";
|
|
42
|
-
|
|
43
|
-
const SallaSocialShare$1 = /*@__PURE__*/ proxyCustomElement(class SallaSocialShare extends HTMLElement {
|
|
44
|
-
constructor() {
|
|
45
|
-
super();
|
|
46
|
-
this.__registerHost();
|
|
47
|
-
this.opened = false;
|
|
48
|
-
this.allPlatforms = [Socials.WHATSAPP, Socials.FACEBOOK, Socials.TWITTER, Socials.EMAIL, Socials.COPY_LINK];
|
|
49
|
-
this.platformIcons = [{ icon: whatsapp, name: Socials.WHATSAPP }, {
|
|
50
|
-
icon: facebook,
|
|
51
|
-
name: Socials.FACEBOOK
|
|
52
|
-
}, { icon: twitter, name: Socials.TWITTER }, { icon: MailIcon, name: Socials.EMAIL }, {
|
|
53
|
-
icon: copy_link,
|
|
54
|
-
name: Socials.COPY_LINK
|
|
55
|
-
}];
|
|
56
|
-
this.convertedPlatforms = [];
|
|
57
|
-
/**
|
|
58
|
-
* page url that will be shared custom | current page url
|
|
59
|
-
*/
|
|
60
|
-
this.url = "";
|
|
61
|
-
/**
|
|
62
|
-
* page url name that will be shared custom | current page url
|
|
63
|
-
*/
|
|
64
|
-
this.urlName = "";
|
|
65
|
-
/**
|
|
66
|
-
* selected platforms to share | all platforms
|
|
67
|
-
*/
|
|
68
|
-
this.platforms = 'facebook,twitter,whatsapp,email,copy_link';
|
|
69
|
-
}
|
|
70
|
-
componentWillLoad() {
|
|
71
|
-
if (this.host.hasAttribute('aria-label')) {
|
|
72
|
-
this.host.removeAttribute('aria-label');
|
|
73
|
-
}
|
|
74
|
-
if (document.getElementById('a2a-script')) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
const script = document.createElement('script');
|
|
78
|
-
script.src = 'https://static.addtoany.com/menu/page.js';
|
|
79
|
-
script.setAttribute('id', 'a2a-script');
|
|
80
|
-
script.async = true;
|
|
81
|
-
script.onload = function () {
|
|
82
|
-
window.a2a_config.locale = salla.config.get('user.language_code', salla.lang.getLocale());
|
|
83
|
-
window.a2a_config.callbacks = window.a2a_config.callbacks || [];
|
|
84
|
-
window.a2a_config.callbacks.push({
|
|
85
|
-
share: (data) => {
|
|
86
|
-
// Handle share event
|
|
87
|
-
const shareData = {
|
|
88
|
-
share_via: data.service.toLowerCase(),
|
|
89
|
-
url: data.url,
|
|
90
|
-
title: data.title
|
|
91
|
-
};
|
|
92
|
-
// Dispatch the share event
|
|
93
|
-
salla.event.emit('share-element', shareData);
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
};
|
|
97
|
-
document.body.appendChild(script);
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Activate or open the share menu.
|
|
101
|
-
*/
|
|
102
|
-
async open() {
|
|
103
|
-
const animateList = new anime.timeline().add({
|
|
104
|
-
targets: this.shareMenu,
|
|
105
|
-
translateY: [-50, 0],
|
|
106
|
-
opacity: [0, 1],
|
|
107
|
-
duration: 300,
|
|
108
|
-
podding: '0',
|
|
109
|
-
easing: 'easeInOutSine'
|
|
110
|
-
});
|
|
111
|
-
animateList.add({
|
|
112
|
-
targets: this.shareMenu.children,
|
|
113
|
-
translateZ: 0,
|
|
114
|
-
translateY: [-30, 0],
|
|
115
|
-
scaleY: [0, 1],
|
|
116
|
-
opacity: [0, 1],
|
|
117
|
-
duration: 1400,
|
|
118
|
-
delay: anime.stagger(100)
|
|
119
|
-
}, '-=200');
|
|
120
|
-
this.opened = !this.opened;
|
|
121
|
-
if (this.opened) {
|
|
122
|
-
this.shareMenu.classList.add('opened');
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
animateList.pause();
|
|
126
|
-
animateList.seek(0);
|
|
127
|
-
this.shareMenu.classList.remove('opened');
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Asynchronously initializes the "AddToAny" (a2a) social sharing tool on the current page.
|
|
132
|
-
* If the global object `window.a2a` is available, it initializes the tool with the 'page' mode.
|
|
133
|
-
* The 'page' mode is typically used to enable sharing of the current webpage.
|
|
134
|
-
*
|
|
135
|
-
* @remarks
|
|
136
|
-
* This function is designed to be used in scenarios where dynamic loading or refreshing of social sharing tools is needed.
|
|
137
|
-
* Ensure that the AddToAny script is properly included in the HTML document before calling this function.
|
|
138
|
-
*
|
|
139
|
-
* @example
|
|
140
|
-
* // Call the refresh function to initialize AddToAny on the page.
|
|
141
|
-
* await refresh();
|
|
142
|
-
*
|
|
143
|
-
* @throws {Error} Throws an error if the AddToAny script is not properly included or if there are issues during initialization.
|
|
144
|
-
*
|
|
145
|
-
* @async
|
|
146
|
-
* @returns {Promise<void>} A promise that resolves once the initialization is complete.
|
|
147
|
-
*/
|
|
148
|
-
async refresh() {
|
|
149
|
-
// Attempt to initialize AddToAny with 'page' mode if the global object `window.a2a` is available.
|
|
150
|
-
window.a2a?.init('page');
|
|
151
|
-
}
|
|
152
|
-
render() {
|
|
153
|
-
return (h("div", { key: 'e45420682a1b9bf686cbb9d3beff5a208505e1c7', class: "s-social-share-wrapper" }, h("slot", { key: '265102d26da7ce2d297969e1941b9a5785da3971', name: 'widget' }, h("salla-button", { key: '9f36a44dc9487f4956c1d8b73f0fcc41cf8a01b8', "aria-label": "Share", onClick: () => this.open(), class: "s-social-share-btn", shape: "icon", fill: "outline", color: "light" }, h("span", { key: 'b34ed78cd6549bff733de5c542a42ca9aaf805d0', innerHTML: this.opened ? Cancel : ShareAlt }))), h("ul", { key: 'f8eb408030d409880391b7d13b5a701226b0d42a', ref: el => this.shareMenu = el, class: "s-social-share-list a2a_kit share", "data-a2a-url": this.url ? this.url : window.location.href, "data-a2a-title": this.urlName ? this.urlName : document.title }, this.platforms.split(',').map(platform => {
|
|
154
|
-
return (h("li", null, h("a", { class: `a2a_button_${platform}`, "aria-label": `Share Via ${platform}` }, this.platformIcons.map((icon) => {
|
|
155
|
-
if (icon.name === platform) {
|
|
156
|
-
return h("span", { class: "s-social-share-icon", innerHTML: icon.icon });
|
|
157
|
-
}
|
|
158
|
-
}))));
|
|
159
|
-
}))));
|
|
160
|
-
}
|
|
161
|
-
get host() { return this; }
|
|
162
|
-
static get style() { return sallaSocialShareCss; }
|
|
163
|
-
}, [4, "salla-social-share", {
|
|
164
|
-
"url": [513],
|
|
165
|
-
"urlName": [513, "url-name"],
|
|
166
|
-
"platforms": [513],
|
|
167
|
-
"opened": [32],
|
|
168
|
-
"allPlatforms": [32],
|
|
169
|
-
"platformIcons": [32],
|
|
170
|
-
"convertedPlatforms": [32],
|
|
171
|
-
"open": [64],
|
|
172
|
-
"refresh": [64]
|
|
173
|
-
}]);
|
|
174
|
-
function defineCustomElement$1() {
|
|
175
|
-
if (typeof customElements === "undefined") {
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
178
|
-
const components = ["salla-social-share", "salla-button"];
|
|
179
|
-
components.forEach(tagName => { switch (tagName) {
|
|
180
|
-
case "salla-social-share":
|
|
181
|
-
if (!customElements.get(tagName)) {
|
|
182
|
-
customElements.define(tagName, SallaSocialShare$1);
|
|
183
|
-
}
|
|
184
|
-
break;
|
|
185
|
-
case "salla-button":
|
|
186
|
-
if (!customElements.get(tagName)) {
|
|
187
|
-
defineCustomElement$2();
|
|
188
|
-
}
|
|
189
|
-
break;
|
|
190
|
-
} });
|
|
191
|
-
}
|
|
192
|
-
defineCustomElement$1();
|
|
4
|
+
import { S as SallaSocialShare$1, d as defineCustomElement$1 } from './salla-social-share2.js';
|
|
193
5
|
|
|
194
6
|
const SallaSocialShare = SallaSocialShare$1;
|
|
195
7
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
5
|
+
import { a as anime } from './anime.es.js';
|
|
6
|
+
import { f as facebook, t as twitter } from './facebook.js';
|
|
7
|
+
import { M as MailIcon } from './mail.js';
|
|
8
|
+
import { C as Cancel } from './cancel.js';
|
|
9
|
+
import { d as defineCustomElement$1 } from './salla-button2.js';
|
|
10
|
+
|
|
11
|
+
var copy_link = `<!-- Generated by IcoMoon.io -->
|
|
12
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
13
|
+
<title>link</title>
|
|
14
|
+
<path d="M19.247 23.019l-4.189 4.189c-2.831 2.831-7.435 2.831-10.265 0-1.371-1.372-2.125-3.193-2.125-5.132s0.755-3.761 2.125-5.133l4.189-4.191c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.521-1.885 0l-4.189 4.191c-1.875 1.875-2.907 4.367-2.907 7.019s1.032 5.143 2.907 7.017 4.368 2.907 7.019 2.907 5.143-1.032 7.017-2.908l4.189-4.189c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.52-1.885 0.001zM22.276 9.724c-0.521-0.521-1.364-0.521-1.885 0l-10.667 10.667c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l10.667-10.667c0.521-0.521 0.521-1.364 0-1.885zM29.093 2.908c-1.875-1.876-4.368-2.908-7.019-2.908s-5.143 1.032-7.017 2.908l-4.189 4.188c-0.521 0.521-0.521 1.364 0 1.885s1.364 0.521 1.885 0l4.189-4.189c2.831-2.831 7.435-2.831 10.265 0 1.371 1.372 2.125 3.193 2.125 5.132s-0.755 3.761-2.125 5.133l-4.189 4.191c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l4.189-4.191c1.875-1.875 2.907-4.367 2.907-7.019s-1.032-5.143-2.907-7.016z"></path>
|
|
15
|
+
</svg>
|
|
16
|
+
`;
|
|
17
|
+
|
|
18
|
+
var whatsapp = `<!-- Generated by IcoMoon.io -->
|
|
19
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
20
|
+
<title>whatsapp</title>
|
|
21
|
+
<path d="M16 32c-0.008 0-0.018 0-0.028 0-3.1 0-5.993-0.887-8.439-2.421l0.066 0.039-7.2 2.3 2.336-6.964c-1.713-2.492-2.736-5.575-2.736-8.897 0-0.020 0-0.040 0-0.060v0.003c0.009-8.833 7.167-15.991 15.999-16h0.001c8.837 0 16 7.163 16 16s-7.163 16-16 16v0zM7.906 27.424l0.4 0.264c2.169 1.449 4.837 2.312 7.707 2.312 7.732 0 14-6.268 14-14s-6.268-14-14-14c-0.004 0-0.009 0-0.013 0h0.001c-7.729 0.008-13.992 6.271-14 13.999v0.001c-0 0.010-0 0.021-0 0.032 0 3.072 1 5.909 2.693 8.206l-0.027-0.038 0.304 0.416-1.4 4.2zM20.716 24.958c-1.684-0.131-3.237-0.574-4.641-1.271l0.073 0.033c-3.098-1.456-5.634-3.668-7.438-6.405l-0.042-0.067c-1.102-1.357-1.819-3.067-1.962-4.938l-0.002-0.030c-0.001-0.036-0.001-0.078-0.001-0.12 0-1.575 0.66-2.995 1.719-4l0.002-0.002c0.547-0.52 1.289-0.839 2.105-0.839 0.033 0 0.066 0.001 0.099 0.002l-0.005-0c0.2 0 0.378 0 0.542 0.018 0.016-0.001 0.035-0.001 0.054-0.001 0.815 0 1.502 0.549 1.711 1.298l0.003 0.012 0.324 0.782c0.376 0.906 0.858 2.068 0.942 2.244 0.144 0.251 0.23 0.552 0.23 0.873 0 0.286-0.068 0.557-0.188 0.797l0.005-0.010c-0.149 0.307-0.332 0.57-0.55 0.802l0.002-0.002c-0.148 0.168-0.248 0.274-0.346 0.378s-0.172 0.18-0.26 0.284c0.575 0.92 1.237 1.713 1.992 2.406l0.008 0.008c0.829 0.758 1.802 1.373 2.872 1.8l0.064 0.022c0.369-0.266 0.672-0.6 0.896-0.985l0.008-0.015 0.174-0.232c0.328-0.484 0.875-0.798 1.495-0.798 0.249 0 0.487 0.051 0.703 0.142l-0.012-0.004c0.492 0.168 2.922 1.372 2.946 1.384l0.228 0.11c0.415 0.149 0.758 0.417 0.996 0.763l0.004 0.007c0.107 0.349 0.169 0.75 0.169 1.166 0 0.591-0.125 1.153-0.349 1.661l0.010-0.026c-0.702 1.368-1.983 2.353-3.511 2.637l-0.031 0.005c-0.309 0.071-0.663 0.112-1.028 0.112-0.004 0-0.007 0-0.011 0h0.001zM10.632 9.318c-0.028-0.002-0.062-0.004-0.095-0.004-0.245 0-0.472 0.076-0.659 0.206l0.004-0.002c-0.726 0.651-1.18 1.591-1.18 2.638 0 0.044 0.001 0.087 0.002 0.13l-0-0.006c0.122 1.404 0.662 2.662 1.495 3.671l-0.009-0.011 0.12 0.168c1.627 2.491 3.865 4.46 6.504 5.723l0.096 0.041c3.136 1.288 3.916 1.124 4.426 1.014 0.87-0.159 1.601-0.656 2.067-1.347l0.007-0.011c0.12-0.316 0.204-0.682 0.237-1.063l0.001-0.015-0.040-0.018-0.256-0.124c-0.8-0.4-2.46-1.2-2.734-1.292l-0.058 0.184c-0.346 0.501-0.684 0.934-1.045 1.347l0.015-0.017c-0.344 0.349-0.821 0.565-1.349 0.565-0.28 0-0.546-0.061-0.785-0.17l0.012 0.005c-1.403-0.547-2.609-1.301-3.646-2.239l0.010 0.009c-0.975-0.891-1.81-1.912-2.486-3.039l-0.034-0.061c-0.152-0.244-0.242-0.54-0.242-0.857 0-0.463 0.191-0.88 0.499-1.178l0-0c0.13-0.162 0.264-0.302 0.4-0.444l0.236-0.256c0.091-0.096 0.177-0.201 0.254-0.311l0.006-0.009c-0.158-0.36-0.622-1.472-0.988-2.352l-0.322-0.772-0.038-0.086c-0.188-0.010-0.302-0.016-0.426-0.016zM12.462 12.442v0.012z"></path>
|
|
22
|
+
</svg>
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
var Socials;
|
|
26
|
+
(function (Socials) {
|
|
27
|
+
Socials["FACEBOOK"] = "facebook";
|
|
28
|
+
Socials["TWITTER"] = "twitter";
|
|
29
|
+
Socials["WHATSAPP"] = "whatsapp";
|
|
30
|
+
Socials["EMAIL"] = "email";
|
|
31
|
+
Socials["COPY_LINK"] = "copy_link";
|
|
32
|
+
})(Socials || (Socials = {}));
|
|
33
|
+
|
|
34
|
+
var ShareAlt = `<!-- Generated by IcoMoon.io -->
|
|
35
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
36
|
+
<title>share-alt</title>
|
|
37
|
+
<path d="M26.667 21.333c-1.699 0-3.196 0.812-4.173 2.052l-11.912-5.211c0.044-0.276 0.085-0.553 0.085-0.841 0-0.472-0.081-0.923-0.197-1.359l12.361-6.952c0.971 1.009 2.328 1.644 3.836 1.644 2.941 0 5.333-2.392 5.333-5.333s-2.392-5.333-5.333-5.333-5.333 2.392-5.333 5.333c0 0.472 0.081 0.923 0.197 1.359l-12.361 6.952c-0.971-1.009-2.328-1.644-3.836-1.644-2.941 0-5.333 2.392-5.333 5.333s2.392 5.333 5.333 5.333c1.699 0 3.196-0.812 4.173-2.052l11.912 5.211c-0.044 0.276-0.085 0.553-0.085 0.841 0 2.941 2.392 5.333 5.333 5.333s5.333-2.392 5.333-5.333-2.392-5.333-5.333-5.333zM26.667 2.667c1.471 0 2.667 1.196 2.667 2.667s-1.196 2.667-2.667 2.667-2.667-1.196-2.667-2.667 1.196-2.667 2.667-2.667zM5.333 20c-1.471 0-2.667-1.196-2.667-2.667s1.196-2.667 2.667-2.667 2.667 1.196 2.667 2.667-1.196 2.667-2.667 2.667zM26.667 29.333c-1.471 0-2.667-1.196-2.667-2.667s1.196-2.667 2.667-2.667 2.667 1.196 2.667 2.667-1.196 2.667-2.667 2.667z"></path>
|
|
38
|
+
</svg>
|
|
39
|
+
`;
|
|
40
|
+
|
|
41
|
+
const sallaSocialShareCss = ":global(body.s-social-share-modal-is-open){overflow:hidden}.s-social-share-modal{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;padding:1rem;background-color:rgba(17, 24, 39, 0.5)}.s-social-share-modal-dialog{position:relative;width:100%;max-width:32rem;padding:1.5rem;background-color:#fff;border-radius:1rem;box-shadow:0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)}.s-social-share-modal-handle{display:none}.s-social-share-modal-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1.25rem}.s-social-share-modal-title{font-size:1.125rem;font-weight:700;color:#1f2937}.s-social-share-modal-close{display:inline-flex;align-items:center;justify-content:center;padding:0.25rem;line-height:0;background:transparent;border:0;cursor:pointer}.s-social-share-modal-close-icon svg{width:1.25rem;height:1.25rem;fill:#ef4444}.s-social-share-modal-platforms{display:grid;grid-template-columns:repeat(4, minmax(0, 1fr));gap:0.75rem}.s-social-share-modal-card{display:flex;flex-direction:column;align-items:center;gap:0.5rem;padding:0.75rem;border:1px solid #e5e7eb;border-radius:0.75rem;text-decoration:none;cursor:pointer;transition:border-color 0.15s ease, box-shadow 0.15s ease}.s-social-share-modal-card:hover{border-color:#d1d5db;box-shadow:0 1px 3px rgba(0, 0, 0, 0.08)}.s-social-share-modal-icon{display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:9999px}.s-social-share-modal-icon svg{width:1.25rem;height:1.25rem;fill:#fff}.s-social-share-modal-card-label{font-size:0.875rem;color:#4b5563}.s-social-share-modal-copy-row{display:flex;align-items:center;gap:0.75rem;margin-top:1rem;padding:0.5rem;background-color:#f3f4f6;border-radius:0.75rem}.s-social-share-modal-url{flex:1 1 auto;min-width:0;padding:0 0.5rem;font-size:0.875rem;color:#6b7280;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes s-social-share-sheet-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@media (max-width: 640px){.s-social-share-modal{align-items:flex-end;justify-content:center;padding:0}.s-social-share-modal-dialog{max-width:none;padding:0.75rem 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));border-radius:1rem 1rem 0 0;box-shadow:0 -4px 24px rgba(0, 0, 0, 0.12);animation:s-social-share-sheet-in 0.28s ease-out}.s-social-share-modal-handle{display:block;width:2.5rem;height:0.25rem;margin:0 auto 0.75rem;background-color:#d1d5db;border-radius:9999px}.s-social-share-modal-header{margin-bottom:1rem}.s-social-share-modal-platforms{grid-template-columns:repeat(2, minmax(0, 1fr))}}";
|
|
42
|
+
|
|
43
|
+
const SallaSocialShare = /*@__PURE__*/ proxyCustomElement(class SallaSocialShare extends HTMLElement {
|
|
44
|
+
constructor() {
|
|
45
|
+
super();
|
|
46
|
+
this.__registerHost();
|
|
47
|
+
this.ignoreOutsideClick = false;
|
|
48
|
+
/** Bilingual defaults for the modal variant; store translations always win. */
|
|
49
|
+
this.translationDefaults = {
|
|
50
|
+
'common.social.share': { ar: 'مشاركة', en: 'Share' },
|
|
51
|
+
'common.social.email': { ar: 'إيميل', en: 'Email' },
|
|
52
|
+
'common.social.whatsapp': { ar: 'واتساب', en: 'WhatsApp' },
|
|
53
|
+
'common.social.twitter': { ar: 'أكس', en: 'X' },
|
|
54
|
+
'common.social.facebook': { ar: 'فيسبوك', en: 'Facebook' },
|
|
55
|
+
'common.social.copy': { ar: 'نسخ', en: 'Copy' },
|
|
56
|
+
'common.social.copied': { ar: 'تم النسخ', en: 'Copied' },
|
|
57
|
+
};
|
|
58
|
+
this.onDocumentClick = (event) => {
|
|
59
|
+
if (this.ignoreOutsideClick || !this.opened || this.host.contains(event.target)) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
void this.close();
|
|
63
|
+
};
|
|
64
|
+
this.opened = false;
|
|
65
|
+
this.copied = false;
|
|
66
|
+
this.allPlatforms = [
|
|
67
|
+
Socials.WHATSAPP,
|
|
68
|
+
Socials.FACEBOOK,
|
|
69
|
+
Socials.TWITTER,
|
|
70
|
+
Socials.EMAIL,
|
|
71
|
+
Socials.COPY_LINK,
|
|
72
|
+
];
|
|
73
|
+
this.platformIcons = [
|
|
74
|
+
{ icon: whatsapp, name: Socials.WHATSAPP },
|
|
75
|
+
{
|
|
76
|
+
icon: facebook,
|
|
77
|
+
name: Socials.FACEBOOK,
|
|
78
|
+
},
|
|
79
|
+
{ icon: twitter, name: Socials.TWITTER },
|
|
80
|
+
{ icon: MailIcon, name: Socials.EMAIL },
|
|
81
|
+
{
|
|
82
|
+
icon: copy_link,
|
|
83
|
+
name: Socials.COPY_LINK,
|
|
84
|
+
},
|
|
85
|
+
];
|
|
86
|
+
this.convertedPlatforms = [];
|
|
87
|
+
/**
|
|
88
|
+
* page url that will be shared custom | current page url
|
|
89
|
+
*/
|
|
90
|
+
this.url = '';
|
|
91
|
+
/**
|
|
92
|
+
* page url name that will be shared custom | current page url
|
|
93
|
+
*/
|
|
94
|
+
this.urlName = '';
|
|
95
|
+
/**
|
|
96
|
+
* selected platforms to share | all platforms
|
|
97
|
+
*/
|
|
98
|
+
this.platforms = 'facebook,twitter,whatsapp,email,copy_link';
|
|
99
|
+
/**
|
|
100
|
+
* Share UI variant: `default` dropdown menu or centered `modal` dialog.
|
|
101
|
+
*/
|
|
102
|
+
this.mode = 'default';
|
|
103
|
+
/**
|
|
104
|
+
* Optional title for the modal variant header. Defaults to a localized "Share".
|
|
105
|
+
*/
|
|
106
|
+
this.modalTitle = '';
|
|
107
|
+
}
|
|
108
|
+
componentWillLoad() {
|
|
109
|
+
this.registerTranslationDefaults();
|
|
110
|
+
if (this.host.hasAttribute('aria-label')) {
|
|
111
|
+
this.host.removeAttribute('aria-label');
|
|
112
|
+
}
|
|
113
|
+
if (document.getElementById('a2a-script')) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
const script = document.createElement('script');
|
|
117
|
+
script.src = 'https://static.addtoany.com/menu/page.js';
|
|
118
|
+
script.setAttribute('id', 'a2a-script');
|
|
119
|
+
script.async = true;
|
|
120
|
+
script.onload = function () {
|
|
121
|
+
window.a2a_config.locale = salla.config.get('user.language_code', salla.lang.getLocale());
|
|
122
|
+
window.a2a_config.callbacks = window.a2a_config.callbacks || [];
|
|
123
|
+
window.a2a_config.callbacks.push({
|
|
124
|
+
share: data => {
|
|
125
|
+
// Handle share event
|
|
126
|
+
const shareData = {
|
|
127
|
+
share_via: data.service.toLowerCase(),
|
|
128
|
+
url: data.url,
|
|
129
|
+
title: data.title,
|
|
130
|
+
};
|
|
131
|
+
// Dispatch the share event
|
|
132
|
+
salla.event.emit('share-element', shareData);
|
|
133
|
+
},
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
document.body.appendChild(script);
|
|
137
|
+
}
|
|
138
|
+
componentDidLoad() {
|
|
139
|
+
document.addEventListener('click', this.onDocumentClick);
|
|
140
|
+
}
|
|
141
|
+
disconnectedCallback() {
|
|
142
|
+
document.removeEventListener('click', this.onDocumentClick);
|
|
143
|
+
if (this.copiedResetTimeout) {
|
|
144
|
+
window.clearTimeout(this.copiedResetTimeout);
|
|
145
|
+
}
|
|
146
|
+
this.setBodyScrollLocked(false);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Register bilingual (ar/en) defaults without overriding existing translations.
|
|
150
|
+
*/
|
|
151
|
+
registerTranslationDefaults() {
|
|
152
|
+
if (!salla?.lang?.addBulk) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
const missing = Object.entries(this.translationDefaults).reduce((acc, [key, value]) => {
|
|
156
|
+
if (salla.lang.get(key) === key) {
|
|
157
|
+
acc[key] = value;
|
|
158
|
+
}
|
|
159
|
+
return acc;
|
|
160
|
+
}, {});
|
|
161
|
+
if (Object.keys(missing).length) {
|
|
162
|
+
salla.lang.addBulk(missing);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
resolveShareKit() {
|
|
166
|
+
return this.host.querySelector('.a2a_kit');
|
|
167
|
+
}
|
|
168
|
+
deferOutsideClickGuard() {
|
|
169
|
+
this.ignoreOutsideClick = true;
|
|
170
|
+
requestAnimationFrame(() => {
|
|
171
|
+
this.ignoreOutsideClick = false;
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Open the share menu.
|
|
176
|
+
*/
|
|
177
|
+
async open() {
|
|
178
|
+
if (this.opened) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
this.opened = true;
|
|
182
|
+
this.deferOutsideClickGuard();
|
|
183
|
+
if (this.mode === 'modal') {
|
|
184
|
+
this.setBodyScrollLocked(true);
|
|
185
|
+
}
|
|
186
|
+
await new Promise(resolve => requestAnimationFrame(() => resolve()));
|
|
187
|
+
if (!this.opened) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
// Wire AddToAny on the freshly rendered anchors (kit only exists once opened).
|
|
191
|
+
await this.refresh();
|
|
192
|
+
if (this.mode === 'modal') {
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
const menu = this.resolveShareKit();
|
|
196
|
+
if (!menu) {
|
|
197
|
+
this.opened = false;
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
this.openAnimation = new anime.timeline().add({
|
|
201
|
+
targets: menu,
|
|
202
|
+
translateY: [-50, 0],
|
|
203
|
+
opacity: [0, 1],
|
|
204
|
+
duration: 300,
|
|
205
|
+
podding: '0',
|
|
206
|
+
easing: 'easeInOutSine',
|
|
207
|
+
});
|
|
208
|
+
this.openAnimation.add({
|
|
209
|
+
targets: menu.children,
|
|
210
|
+
translateZ: 0,
|
|
211
|
+
translateY: [-30, 0],
|
|
212
|
+
scaleY: [0, 1],
|
|
213
|
+
opacity: [0, 1],
|
|
214
|
+
duration: 1400,
|
|
215
|
+
delay: anime.stagger(100),
|
|
216
|
+
}, '-=200');
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Close the share menu.
|
|
220
|
+
*/
|
|
221
|
+
async close() {
|
|
222
|
+
if (!this.opened) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
this.openAnimation?.pause();
|
|
226
|
+
this.openAnimation?.seek(0);
|
|
227
|
+
this.opened = false;
|
|
228
|
+
if (this.mode === 'modal') {
|
|
229
|
+
this.setBodyScrollLocked(false);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
setBodyScrollLocked(locked) {
|
|
233
|
+
document.body.classList.toggle('s-social-share-modal-is-open', locked);
|
|
234
|
+
}
|
|
235
|
+
toggle() {
|
|
236
|
+
if (this.opened) {
|
|
237
|
+
return this.close();
|
|
238
|
+
}
|
|
239
|
+
this.deferOutsideClickGuard();
|
|
240
|
+
return this.open();
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Asynchronously initializes the "AddToAny" (a2a) social sharing tool on the current page.
|
|
244
|
+
* If the global object `window.a2a` is available, it initializes the tool with the 'page' mode.
|
|
245
|
+
* The 'page' mode is typically used to enable sharing of the current webpage.
|
|
246
|
+
*
|
|
247
|
+
* @remarks
|
|
248
|
+
* This function is designed to be used in scenarios where dynamic loading or refreshing of social sharing tools is needed.
|
|
249
|
+
* Ensure that the AddToAny script is properly included in the HTML document before calling this function.
|
|
250
|
+
*
|
|
251
|
+
* @example
|
|
252
|
+
* // Call the refresh function to initialize AddToAny on the page.
|
|
253
|
+
* await refresh();
|
|
254
|
+
*
|
|
255
|
+
* @throws {Error} Throws an error if the AddToAny script is not properly included or if there are issues during initialization.
|
|
256
|
+
*
|
|
257
|
+
* @async
|
|
258
|
+
* @returns {Promise<void>} A promise that resolves once the initialization is complete.
|
|
259
|
+
*/
|
|
260
|
+
onUrlChanged(newUrl, oldUrl) {
|
|
261
|
+
if (newUrl !== oldUrl) {
|
|
262
|
+
void this.refresh();
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
getShareUrl() {
|
|
266
|
+
return this.url || window.location.href;
|
|
267
|
+
}
|
|
268
|
+
getModalTitle() {
|
|
269
|
+
return this.modalTitle || salla.lang.get('common.social.share');
|
|
270
|
+
}
|
|
271
|
+
syncShareAttributes() {
|
|
272
|
+
const kit = this.resolveShareKit();
|
|
273
|
+
if (!kit) {
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
kit.setAttribute('data-a2a-url', this.getShareUrl());
|
|
277
|
+
kit.setAttribute('data-a2a-title', this.urlName || document.title);
|
|
278
|
+
}
|
|
279
|
+
async refresh() {
|
|
280
|
+
this.syncShareAttributes();
|
|
281
|
+
// Re-scan kits so AddToAny picks up the updated data-a2a-url (init caches the first URL).
|
|
282
|
+
if (typeof window.a2a?.init_all === 'function') {
|
|
283
|
+
window.a2a.init_all();
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
window.a2a?.init('page');
|
|
287
|
+
}
|
|
288
|
+
async copyLink() {
|
|
289
|
+
const url = this.getShareUrl();
|
|
290
|
+
try {
|
|
291
|
+
await navigator.clipboard.writeText(url);
|
|
292
|
+
}
|
|
293
|
+
catch {
|
|
294
|
+
const textarea = document.createElement('textarea');
|
|
295
|
+
textarea.value = url;
|
|
296
|
+
textarea.style.position = 'fixed';
|
|
297
|
+
textarea.style.opacity = '0';
|
|
298
|
+
document.body.appendChild(textarea);
|
|
299
|
+
textarea.select();
|
|
300
|
+
try {
|
|
301
|
+
document.execCommand('copy');
|
|
302
|
+
}
|
|
303
|
+
catch {
|
|
304
|
+
/* noop */
|
|
305
|
+
}
|
|
306
|
+
textarea.remove();
|
|
307
|
+
}
|
|
308
|
+
salla.event.emit('share-element', {
|
|
309
|
+
share_via: 'copy_link',
|
|
310
|
+
url,
|
|
311
|
+
title: this.urlName || document.title,
|
|
312
|
+
});
|
|
313
|
+
this.copied = true;
|
|
314
|
+
if (this.copiedResetTimeout) {
|
|
315
|
+
window.clearTimeout(this.copiedResetTimeout);
|
|
316
|
+
}
|
|
317
|
+
this.copiedResetTimeout = window.setTimeout(() => (this.copied = false), 2000);
|
|
318
|
+
}
|
|
319
|
+
modalPlatformMeta(platform) {
|
|
320
|
+
switch (platform) {
|
|
321
|
+
case Socials.WHATSAPP:
|
|
322
|
+
return {
|
|
323
|
+
icon: whatsapp,
|
|
324
|
+
color: '#25D366',
|
|
325
|
+
label: salla.lang.get('common.social.whatsapp'),
|
|
326
|
+
};
|
|
327
|
+
case Socials.FACEBOOK:
|
|
328
|
+
return {
|
|
329
|
+
icon: facebook,
|
|
330
|
+
color: '#1877F2',
|
|
331
|
+
label: salla.lang.get('common.social.facebook'),
|
|
332
|
+
};
|
|
333
|
+
case Socials.TWITTER:
|
|
334
|
+
return { icon: twitter, color: '#000000', label: salla.lang.get('common.social.twitter') };
|
|
335
|
+
case Socials.EMAIL:
|
|
336
|
+
return { icon: MailIcon, color: '#2BA6FF', label: salla.lang.get('common.social.email') };
|
|
337
|
+
default:
|
|
338
|
+
return { icon: copy_link, color: '#6b7280', label: platform };
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
renderModalCard(platform) {
|
|
342
|
+
const meta = this.modalPlatformMeta(platform);
|
|
343
|
+
return (h("a", { class: `s-social-share-modal-card a2a_button_${platform}`, "aria-label": `Share Via ${platform}` }, h("span", { class: "s-social-share-modal-icon", style: { backgroundColor: meta.color }, innerHTML: meta.icon }), h("span", { class: "s-social-share-modal-card-label" }, meta.label)));
|
|
344
|
+
}
|
|
345
|
+
renderModal() {
|
|
346
|
+
if (!this.opened) {
|
|
347
|
+
return null;
|
|
348
|
+
}
|
|
349
|
+
const enabled = this.platforms.split(',').map(platform => platform.trim());
|
|
350
|
+
const order = [Socials.EMAIL, Socials.WHATSAPP, Socials.TWITTER, Socials.FACEBOOK];
|
|
351
|
+
const platforms = order.filter(platform => enabled.includes(platform));
|
|
352
|
+
const showCopy = enabled.includes(Socials.COPY_LINK);
|
|
353
|
+
return (h("div", { class: "s-social-share-modal", onClick: event => {
|
|
354
|
+
if (event.target === event.currentTarget) {
|
|
355
|
+
void this.close();
|
|
356
|
+
}
|
|
357
|
+
} }, h("div", { class: "s-social-share-modal-dialog", role: "dialog", "aria-modal": "true" }, h("div", { class: "s-social-share-modal-handle", "aria-hidden": "true" }), h("div", { class: "s-social-share-modal-header" }, h("span", { class: "s-social-share-modal-title" }, this.getModalTitle()), h("button", { type: "button", class: "s-social-share-modal-close", "aria-label": salla.lang.get('common.elements.close'), onClick: () => this.close() }, h("span", { class: "s-social-share-modal-close-icon", innerHTML: Cancel }))), h("div", { class: "s-social-share-modal-platforms a2a_kit", "data-a2a-url": this.getShareUrl(), "data-a2a-title": this.urlName ? this.urlName : document.title }, platforms.map(platform => this.renderModalCard(platform))), showCopy && (h("div", { class: "s-social-share-modal-copy-row" }, h("span", { class: "s-social-share-modal-url", dir: "ltr" }, this.getShareUrl()), h("salla-button", { type: "button", fill: "outline", onClick: () => this.copyLink() }, this.copied
|
|
358
|
+
? salla.lang.get('common.social.copied')
|
|
359
|
+
: salla.lang.get('common.social.copy')))))));
|
|
360
|
+
}
|
|
361
|
+
renderPopupList() {
|
|
362
|
+
return (h("ul", { class: {
|
|
363
|
+
's-social-share-list': true,
|
|
364
|
+
a2a_kit: true,
|
|
365
|
+
share: true,
|
|
366
|
+
opened: this.opened,
|
|
367
|
+
}, "data-a2a-url": this.getShareUrl(), "data-a2a-title": this.urlName ? this.urlName : document.title }, this.platforms.split(',').map(platform => {
|
|
368
|
+
return (h("li", null, h("a", { class: `a2a_button_${platform}`, "aria-label": `Share Via ${platform}` }, this.platformIcons.map((icon) => {
|
|
369
|
+
if (icon.name === platform) {
|
|
370
|
+
return h("span", { class: "s-social-share-icon", innerHTML: icon.icon });
|
|
371
|
+
}
|
|
372
|
+
}))));
|
|
373
|
+
})));
|
|
374
|
+
}
|
|
375
|
+
render() {
|
|
376
|
+
return (h("div", { key: '56f669cd8567efe9f1a73e302d2d85be23dd901b', class: "s-social-share-wrapper" }, h("slot", { key: '2c1848fa62c1ec3b8301d0544cd8098ea647e2e7', name: "widget" }, h("salla-button", { key: '0a7ccac871963382f1c2fc594877b5445e5f8830', "aria-label": "Share", onClick: () => this.toggle(), class: "s-social-share-btn", shape: "icon", fill: "outline", color: "light" }, h("span", { key: '658cd0182e40140a73614ae477b43ff2e388e155', innerHTML: this.opened ? Cancel : ShareAlt }))), this.mode === 'modal' ? this.renderModal() : this.renderPopupList()));
|
|
377
|
+
}
|
|
378
|
+
get host() { return this; }
|
|
379
|
+
static get watchers() { return {
|
|
380
|
+
"url": ["onUrlChanged"]
|
|
381
|
+
}; }
|
|
382
|
+
static get style() { return sallaSocialShareCss; }
|
|
383
|
+
}, [4, "salla-social-share", {
|
|
384
|
+
"url": [1537],
|
|
385
|
+
"urlName": [513, "url-name"],
|
|
386
|
+
"platforms": [513],
|
|
387
|
+
"mode": [513],
|
|
388
|
+
"modalTitle": [1, "modal-title"],
|
|
389
|
+
"opened": [32],
|
|
390
|
+
"copied": [32],
|
|
391
|
+
"allPlatforms": [32],
|
|
392
|
+
"platformIcons": [32],
|
|
393
|
+
"convertedPlatforms": [32],
|
|
394
|
+
"open": [64],
|
|
395
|
+
"close": [64],
|
|
396
|
+
"refresh": [64]
|
|
397
|
+
}, undefined, {
|
|
398
|
+
"url": ["onUrlChanged"]
|
|
399
|
+
}]);
|
|
400
|
+
function defineCustomElement() {
|
|
401
|
+
if (typeof customElements === "undefined") {
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
const components = ["salla-social-share", "salla-button"];
|
|
405
|
+
components.forEach(tagName => { switch (tagName) {
|
|
406
|
+
case "salla-social-share":
|
|
407
|
+
if (!customElements.get(tagName)) {
|
|
408
|
+
customElements.define(tagName, SallaSocialShare);
|
|
409
|
+
}
|
|
410
|
+
break;
|
|
411
|
+
case "salla-button":
|
|
412
|
+
if (!customElements.get(tagName)) {
|
|
413
|
+
defineCustomElement$1();
|
|
414
|
+
}
|
|
415
|
+
break;
|
|
416
|
+
} });
|
|
417
|
+
}
|
|
418
|
+
defineCustomElement();
|
|
419
|
+
|
|
420
|
+
export { SallaSocialShare as S, defineCustomElement as d };
|
|
@@ -32,7 +32,7 @@ const SallaTabContent = /*@__PURE__*/ proxyCustomElement(class SallaTabContent e
|
|
|
32
32
|
's-tabs-content': true,
|
|
33
33
|
's-tabs-content-selected': this.isSelected
|
|
34
34
|
};
|
|
35
|
-
return (h("div", { key: '
|
|
35
|
+
return (h("div", { key: 'f2deb9c1508aafe3aff5352094cccc97bdcd42ef', class: classes }, h("slot", { key: '460588864047444acdb06e757a7124d28935c24b' })));
|
|
36
36
|
}
|
|
37
37
|
static get style() { return sallaTabContentCss; }
|
|
38
38
|
}, [4, "salla-tab-content", {
|
|
@@ -58,7 +58,7 @@ const SallaTabHeader = /*@__PURE__*/ proxyCustomElement(class SallaTabHeader ext
|
|
|
58
58
|
's-tabs-active': this.isSelected,
|
|
59
59
|
};
|
|
60
60
|
return [
|
|
61
|
-
h("div", { key: '
|
|
61
|
+
h("div", { key: '153247ab5a7c73819ccc506a45e60b9c084c391c', class: classes, onClick: this.onClick.bind(this) }, h("slot", { key: '417a3ae0c0aec8a965b5d3be9a4f917f290d2109' })),
|
|
62
62
|
];
|
|
63
63
|
}
|
|
64
64
|
static get style() { return sallaTabHeaderCss; }
|
|
@@ -51,7 +51,7 @@ const SallaTabs = /*@__PURE__*/ proxyCustomElement(class SallaTabs extends HTMLE
|
|
|
51
51
|
}
|
|
52
52
|
render() {
|
|
53
53
|
return [
|
|
54
|
-
h("div", { key: '
|
|
54
|
+
h("div", { key: 'ae50836f68ee92459720fa9bf00d73848d849627', class: "s-tabs" }, h("div", { key: '55e8186e80381902269f9bad5738d9a555f71d37', class: "s-tabs-header" }, h("slot", { key: '46ce3e1ea75f92165b3d5ee7c16f19f8693f6d31', name: "header" })), h("div", { key: '3669e643abb37ed2edca73fc0577822a3f7fbb90', class: "s-tabs-content-wrapper" }, h("slot", { key: '2cf8b79f44630e21103991325ceff2cd3a4019ba', name: "content" })))
|
|
55
55
|
];
|
|
56
56
|
}
|
|
57
57
|
get host() { return this; }
|