@salla.sa/twilight-components 2.14.467 → 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-Li5IcLEr.js → filepond-C1SAyrFq.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-CXgEvsrj.js → filepond-plugin-file-poster-DAhQ7rGa.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-DISjKBXN.js → filepond-plugin-file-validate-size-qfwxpApK.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-BeDqb2RU.js → filepond-plugin-file-validate-type-BbYanfPf.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-CTKgasCY.js → filepond-plugin-image-edit-lWdFhMNt.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-BqvyVbfM.js → filepond-plugin-image-exif-orientation-C2wUYBSb.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-DfX-wD-s.js → filepond-plugin-image-preview-B1ukjrjT.js} +1 -1
- package/dist/cjs/{functions-DXNacMtu.js → functions-DCSgyun2.js} +1 -1
- package/dist/cjs/{index-JuURs8Nc.js → index-CXr_39D8.js} +9 -5
- package/dist/cjs/{index-2n84VIdz.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-BdbqBT_O.js → tracked-promise-BsYRgTGD.js} +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-Cj5ogibZ.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-Cpf2HNH9.js → filepond-C4pZr9nR.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-CVurRtjC.js → filepond-plugin-file-poster-CXpAGxT4.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-Dw2xFbfx.js → filepond-plugin-file-validate-size-Dk4M6ge1.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-D6seJVa2.js → filepond-plugin-file-validate-type-DD7qvRsg.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-CBikW78V.js → filepond-plugin-image-edit-DMllAEkg.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-5yNhe9TO.js → filepond-plugin-image-exif-orientation-BRCbcu_E.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-PlAAXB7f.js → filepond-plugin-image-preview-DgeylrwN.js} +1 -1
- package/dist/esm/{functions-Egzz8fEM.js → functions-DrS7by6t.js} +1 -1
- package/dist/esm/{index-Do4FV1UZ.js → index-9SnsJoYO.js} +1 -1
- package/dist/esm/{index-a4x9urdK.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-BX5clCDX.js → tracked-promise-CTcAqNfZ.js} +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-DB0pDHa7.js → vanilla-picker-DfeK45Yv.js} +1 -1
- package/dist/twilight/{p-61b1fd3b.entry.js → p-07af3286.entry.js} +1 -1
- package/dist/twilight/{p-ee605cef.entry.js → p-08337b2b.entry.js} +1 -1
- package/dist/twilight/{p-74a61155.entry.js → p-08771dff.entry.js} +1 -1
- package/dist/twilight/{p-13a033fa.entry.js → p-0e1bab4f.entry.js} +1 -1
- package/dist/twilight/{p-b0bf7a5b.entry.js → p-0eadca17.entry.js} +1 -1
- package/dist/twilight/{p-92b02f3c.entry.js → p-12ccc1ab.entry.js} +1 -1
- package/dist/twilight/{p-52fe97c8.entry.js → p-1574176e.entry.js} +1 -1
- package/dist/twilight/{p-0957f323.entry.js → p-17015f9c.entry.js} +1 -1
- package/dist/twilight/{p-b8ab7da8.entry.js → p-1920b702.entry.js} +1 -1
- package/dist/twilight/{p-91363b7e.entry.js → p-1a1cebfa.entry.js} +1 -1
- package/dist/twilight/{p-1130d4b7.entry.js → p-1a844fda.entry.js} +1 -1
- package/dist/twilight/{p-42a0b54a.entry.js → p-1b7ebf47.entry.js} +1 -1
- package/dist/twilight/{p-e726123e.entry.js → p-223d7ceb.entry.js} +1 -1
- package/dist/twilight/{p-ff270706.entry.js → p-255f5d2a.entry.js} +1 -1
- package/dist/twilight/{p-0da78d4e.entry.js → p-266f57de.entry.js} +1 -1
- package/dist/twilight/p-28bdf8ec.entry.js +4 -0
- package/dist/twilight/{p-fbfacb11.entry.js → p-2c7086ec.entry.js} +1 -1
- package/dist/twilight/{p-d33203b7.entry.js → p-2c7f524a.entry.js} +1 -1
- package/dist/twilight/{p-c60c302f.entry.js → p-30ea9a82.entry.js} +1 -1
- package/dist/twilight/{p-b80adb19.entry.js → p-313d38cd.entry.js} +1 -1
- package/dist/twilight/{p-241bd42e.entry.js → p-315ce27b.entry.js} +1 -1
- package/dist/twilight/p-378d45e2.entry.js +4 -0
- package/dist/twilight/p-3c2fe8cd.entry.js +4 -0
- package/dist/twilight/{p-d905fbca.entry.js → p-3d1e7982.entry.js} +1 -1
- package/dist/twilight/{p-a068fff4.entry.js → p-3d7c0ac6.entry.js} +1 -1
- package/dist/twilight/{p-c0380d40.entry.js → p-3d8d289e.entry.js} +1 -1
- package/dist/twilight/{p-f6bb956c.entry.js → p-4144c908.entry.js} +1 -1
- package/dist/twilight/{p-5b365561.entry.js → p-453a7bb2.entry.js} +1 -1
- package/dist/twilight/{p-6d87b134.entry.js → p-4c457ba5.entry.js} +1 -1
- package/dist/twilight/{p-735fafef.entry.js → p-4d3bcacd.entry.js} +1 -1
- package/dist/twilight/{p-d9d4ea5b.entry.js → p-4dedb514.entry.js} +1 -1
- package/dist/twilight/{p-0b169d4e.entry.js → p-50dfec0a.entry.js} +1 -1
- package/dist/twilight/{p-1ce817c2.entry.js → p-53f83426.entry.js} +1 -1
- package/dist/twilight/{p-afcb0117.entry.js → p-54e9ac89.entry.js} +1 -1
- package/dist/twilight/{p-35ac1fc9.entry.js → p-571b8e00.entry.js} +1 -1
- package/dist/twilight/{p-9dc0fec4.entry.js → p-5a5057a8.entry.js} +1 -1
- package/dist/twilight/{p-ec073354.entry.js → p-5a9b94f8.entry.js} +1 -1
- package/dist/twilight/{p-9b639078.entry.js → p-5c1c520a.entry.js} +1 -1
- package/dist/twilight/{p-f170aff7.entry.js → p-5d06fe77.entry.js} +1 -1
- package/dist/twilight/{p-ec5ae058.entry.js → p-5e433652.entry.js} +1 -1
- package/dist/twilight/{p-b0ed6a9f.entry.js → p-6046666d.entry.js} +1 -1
- package/dist/twilight/{p-10e0936d.entry.js → p-67e23040.entry.js} +1 -1
- package/dist/twilight/{p-fa039238.entry.js → p-6c777951.entry.js} +1 -1
- package/dist/twilight/{p-53cbb271.entry.js → p-749dbf27.entry.js} +1 -1
- package/dist/twilight/p-7bd464f3.entry.js +4 -0
- package/dist/twilight/{p-c8fd03c0.entry.js → p-7ffc1711.entry.js} +1 -1
- package/dist/twilight/{p-89f11893.entry.js → p-83b6c374.entry.js} +1 -1
- package/dist/twilight/{p-bfbf8121.entry.js → p-8b5d26d3.entry.js} +1 -1
- package/dist/twilight/{p-92f3ea44.entry.js → p-9a0514dd.entry.js} +1 -1
- package/dist/twilight/{p-f5135cb5.entry.js → p-9ba953ab.entry.js} +1 -1
- package/dist/twilight/{p-BVqg7xd9.js → p-BGpAIcg-.js} +1 -1
- package/dist/twilight/{p-fCaOxwGH.js → p-BHkz1ssL.js} +1 -1
- package/dist/twilight/{p-CsMnvJkR.js → p-BZhp8a87.js} +1 -1
- package/dist/twilight/p-Bo1nXenO.js +4 -0
- package/dist/twilight/{p-D9ni3BuG.js → p-BojnM4VS.js} +1 -1
- package/dist/twilight/{p-B7KW0zhB.js → p-CBU9I-zy.js} +1 -1
- package/dist/twilight/{p-pOgjUtf9.js → p-CGd7EQZr.js} +1 -1
- package/dist/twilight/{p-EPfEwqOC.js → p-D01LipFK.js} +1 -1
- package/dist/twilight/{p-a4x9urdK.js → p-D2yBy7Jh.js} +2 -2
- package/dist/twilight/{p-DiWHgCMH.js → p-DSgSJMud.js} +1 -1
- package/dist/twilight/{p-DLNIOD9t.js → p-DzAIgzdz.js} +1 -1
- package/dist/twilight/{p-fe506679.entry.js → p-a0d88c4d.entry.js} +1 -1
- package/dist/twilight/{p-f684d7bf.entry.js → p-a2b53a52.entry.js} +1 -1
- package/dist/twilight/{p-78020271.entry.js → p-a3e1fafc.entry.js} +1 -1
- package/dist/twilight/{p-fdde8399.entry.js → p-a463d567.entry.js} +1 -1
- package/dist/twilight/{p-ba1199ba.entry.js → p-a6a9e398.entry.js} +1 -1
- package/dist/twilight/{p-0405f5e8.entry.js → p-a79f60e6.entry.js} +1 -1
- package/dist/twilight/{p-0bdf58a4.entry.js → p-aadfd70e.entry.js} +1 -1
- package/dist/twilight/{p-ad19661d.entry.js → p-ad0a27e2.entry.js} +1 -1
- package/dist/twilight/{p-e90d18b2.entry.js → p-ae8bd2e7.entry.js} +1 -1
- package/dist/twilight/{p-d17596ff.entry.js → p-af121bbf.entry.js} +1 -1
- package/dist/twilight/p-b0f28806.entry.js +4 -0
- package/dist/twilight/{p-0b1970c2.entry.js → p-b3f6b725.entry.js} +1 -1
- package/dist/twilight/{p-1a37b959.entry.js → p-b7e720e8.entry.js} +1 -1
- package/dist/twilight/{p-a53d5944.entry.js → p-b80016c8.entry.js} +1 -1
- package/dist/twilight/{p-635347c9.entry.js → p-c0f40eea.entry.js} +1 -1
- package/dist/twilight/p-c4bc10c1.entry.js +4 -0
- package/dist/twilight/p-c637b6bb.entry.js +4 -0
- package/dist/twilight/{p-127ee640.entry.js → p-c6e18746.entry.js} +1 -1
- package/dist/twilight/{p-5803c158.entry.js → p-cb855cb3.entry.js} +1 -1
- package/dist/twilight/{p-4d393389.entry.js → p-cbc44b3e.entry.js} +1 -1
- package/dist/twilight/{p-6d47892b.entry.js → p-cbf547f0.entry.js} +1 -1
- package/dist/twilight/{p-e27363dd.entry.js → p-cebad615.entry.js} +1 -1
- package/dist/twilight/{p-316135f8.entry.js → p-cfd910a8.entry.js} +1 -1
- package/dist/twilight/{p-d0340e11.entry.js → p-d0a8b9be.entry.js} +1 -1
- package/dist/twilight/{p-59f7f014.entry.js → p-d0cae7da.entry.js} +1 -1
- package/dist/twilight/{p-03d13b9f.entry.js → p-d861eea6.entry.js} +1 -1
- package/dist/twilight/p-daa9c0b3.entry.js +4 -0
- package/dist/twilight/{p-59f815bc.entry.js → p-db43fa93.entry.js} +1 -1
- package/dist/twilight/{p-e1205d19.entry.js → p-e06a7e19.entry.js} +1 -1
- package/dist/twilight/{p-0c748664.entry.js → p-e34f68e0.entry.js} +1 -1
- package/dist/twilight/{p-08b2c781.entry.js → p-e4cac2a9.entry.js} +1 -1
- package/dist/twilight/{p-056400a1.entry.js → p-e5de1833.entry.js} +1 -1
- package/dist/twilight/{p-fa1cc092.entry.js → p-e80ee5b0.entry.js} +6 -6
- package/dist/twilight/{p-16bcc5ab.entry.js → p-e8ffc069.entry.js} +1 -1
- package/dist/twilight/{p-2bcfb4f3.entry.js → p-ee8c7a5a.entry.js} +1 -1
- package/dist/twilight/p-f0dedf42.entry.js +4 -0
- package/dist/twilight/{p-37457147.entry.js → p-f3a01895.entry.js} +1 -1
- package/dist/twilight/{p-ef8fb222.entry.js → p-fb56a444.entry.js} +1 -1
- package/dist/twilight/{p-e8a82952.entry.js → p-fe1bced4.entry.js} +1 -1
- package/dist/twilight/{p-DSBkBAFI.js → p-paiaALkJ.js} +1 -1
- package/dist/twilight/{p-CkA6UKAD.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-234fdf72.entry.js +0 -4
- package/dist/twilight/p-3fbd88d0.entry.js +0 -4
- package/dist/twilight/p-7a1cfd65.entry.js +0 -4
- package/dist/twilight/p-865c602e.entry.js +0 -4
- package/dist/twilight/p-9df5c9a7.entry.js +0 -4
- package/dist/twilight/p-C4aFleDM.js +0 -4
- package/dist/twilight/p-e485d0b8.entry.js +0 -4
- package/dist/twilight/p-f5072671.entry.js +0 -4
- package/dist/twilight/p-fb7904e6.entry.js +0 -4
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
:global(body.s-social-share-modal-is-open) {
|
|
2
|
+
overflow: hidden;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.s-social-share-modal {
|
|
6
|
+
position: fixed;
|
|
7
|
+
inset: 0;
|
|
8
|
+
z-index: 60;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
padding: 1rem;
|
|
13
|
+
background-color: rgba(17, 24, 39, 0.5);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.s-social-share-modal-dialog {
|
|
17
|
+
position: relative;
|
|
18
|
+
width: 100%;
|
|
19
|
+
max-width: 32rem;
|
|
20
|
+
padding: 1.5rem;
|
|
21
|
+
background-color: #fff;
|
|
22
|
+
border-radius: 1rem;
|
|
23
|
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.s-social-share-modal-handle {
|
|
27
|
+
display: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.s-social-share-modal-header {
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: space-between;
|
|
34
|
+
gap: 1rem;
|
|
35
|
+
margin-bottom: 1.25rem;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.s-social-share-modal-title {
|
|
39
|
+
font-size: 1.125rem;
|
|
40
|
+
font-weight: 700;
|
|
41
|
+
color: #1f2937;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.s-social-share-modal-close {
|
|
45
|
+
display: inline-flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
padding: 0.25rem;
|
|
49
|
+
line-height: 0;
|
|
50
|
+
background: transparent;
|
|
51
|
+
border: 0;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.s-social-share-modal-close-icon svg {
|
|
56
|
+
width: 1.25rem;
|
|
57
|
+
height: 1.25rem;
|
|
58
|
+
fill: #ef4444;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.s-social-share-modal-platforms {
|
|
62
|
+
display: grid;
|
|
63
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
64
|
+
gap: 0.75rem;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.s-social-share-modal-card {
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
align-items: center;
|
|
71
|
+
gap: 0.5rem;
|
|
72
|
+
padding: 0.75rem;
|
|
73
|
+
border: 1px solid #e5e7eb;
|
|
74
|
+
border-radius: 0.75rem;
|
|
75
|
+
text-decoration: none;
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.s-social-share-modal-card:hover {
|
|
81
|
+
border-color: #d1d5db;
|
|
82
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.s-social-share-modal-icon {
|
|
86
|
+
display: flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
justify-content: center;
|
|
89
|
+
width: 3rem;
|
|
90
|
+
height: 3rem;
|
|
91
|
+
border-radius: 9999px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.s-social-share-modal-icon svg {
|
|
95
|
+
width: 1.25rem;
|
|
96
|
+
height: 1.25rem;
|
|
97
|
+
fill: #fff;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.s-social-share-modal-card-label {
|
|
101
|
+
font-size: 0.875rem;
|
|
102
|
+
color: #4b5563;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.s-social-share-modal-copy-row {
|
|
106
|
+
display: flex;
|
|
107
|
+
align-items: center;
|
|
108
|
+
gap: 0.75rem;
|
|
109
|
+
margin-top: 1rem;
|
|
110
|
+
padding: 0.5rem;
|
|
111
|
+
background-color: #f3f4f6;
|
|
112
|
+
border-radius: 0.75rem;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.s-social-share-modal-url {
|
|
116
|
+
flex: 1 1 auto;
|
|
117
|
+
min-width: 0;
|
|
118
|
+
padding: 0 0.5rem;
|
|
119
|
+
font-size: 0.875rem;
|
|
120
|
+
color: #6b7280;
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
text-overflow: ellipsis;
|
|
123
|
+
white-space: nowrap;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@keyframes s-social-share-sheet-in {
|
|
127
|
+
from {
|
|
128
|
+
transform: translateY(100%);
|
|
129
|
+
}
|
|
130
|
+
to {
|
|
131
|
+
transform: translateY(0);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
@media (max-width: 640px) {
|
|
135
|
+
.s-social-share-modal {
|
|
136
|
+
align-items: flex-end;
|
|
137
|
+
justify-content: center;
|
|
138
|
+
padding: 0;
|
|
139
|
+
}
|
|
140
|
+
.s-social-share-modal-dialog {
|
|
141
|
+
max-width: none;
|
|
142
|
+
padding: 0.75rem 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
|
|
143
|
+
border-radius: 1rem 1rem 0 0;
|
|
144
|
+
box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
|
|
145
|
+
animation: s-social-share-sheet-in 0.28s ease-out;
|
|
146
|
+
}
|
|
147
|
+
.s-social-share-modal-handle {
|
|
148
|
+
display: block;
|
|
149
|
+
width: 2.5rem;
|
|
150
|
+
height: 0.25rem;
|
|
151
|
+
margin: 0 auto 0.75rem;
|
|
152
|
+
background-color: #d1d5db;
|
|
153
|
+
border-radius: 9999px;
|
|
154
|
+
}
|
|
155
|
+
.s-social-share-modal-header {
|
|
156
|
+
margin-bottom: 1rem;
|
|
157
|
+
}
|
|
158
|
+
.s-social-share-modal-platforms {
|
|
159
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -16,30 +16,69 @@ import ShareAlt from "../../assets/svg/share-alt.svg";
|
|
|
16
16
|
*/
|
|
17
17
|
export class SallaSocialShare {
|
|
18
18
|
constructor() {
|
|
19
|
+
this.ignoreOutsideClick = false;
|
|
20
|
+
/** Bilingual defaults for the modal variant; store translations always win. */
|
|
21
|
+
this.translationDefaults = {
|
|
22
|
+
'common.social.share': { ar: 'مشاركة', en: 'Share' },
|
|
23
|
+
'common.social.email': { ar: 'إيميل', en: 'Email' },
|
|
24
|
+
'common.social.whatsapp': { ar: 'واتساب', en: 'WhatsApp' },
|
|
25
|
+
'common.social.twitter': { ar: 'أكس', en: 'X' },
|
|
26
|
+
'common.social.facebook': { ar: 'فيسبوك', en: 'Facebook' },
|
|
27
|
+
'common.social.copy': { ar: 'نسخ', en: 'Copy' },
|
|
28
|
+
'common.social.copied': { ar: 'تم النسخ', en: 'Copied' },
|
|
29
|
+
};
|
|
30
|
+
this.onDocumentClick = (event) => {
|
|
31
|
+
if (this.ignoreOutsideClick || !this.opened || this.host.contains(event.target)) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
void this.close();
|
|
35
|
+
};
|
|
19
36
|
this.opened = false;
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
37
|
+
this.copied = false;
|
|
38
|
+
this.allPlatforms = [
|
|
39
|
+
Socials.WHATSAPP,
|
|
40
|
+
Socials.FACEBOOK,
|
|
41
|
+
Socials.TWITTER,
|
|
42
|
+
Socials.EMAIL,
|
|
43
|
+
Socials.COPY_LINK,
|
|
44
|
+
];
|
|
45
|
+
this.platformIcons = [
|
|
46
|
+
{ icon: whatsapp, name: Socials.WHATSAPP },
|
|
47
|
+
{
|
|
22
48
|
icon: facebook,
|
|
23
|
-
name: Socials.FACEBOOK
|
|
24
|
-
},
|
|
49
|
+
name: Socials.FACEBOOK,
|
|
50
|
+
},
|
|
51
|
+
{ icon: twitter, name: Socials.TWITTER },
|
|
52
|
+
{ icon: email, name: Socials.EMAIL },
|
|
53
|
+
{
|
|
25
54
|
icon: copy_link,
|
|
26
|
-
name: Socials.COPY_LINK
|
|
27
|
-
}
|
|
55
|
+
name: Socials.COPY_LINK,
|
|
56
|
+
},
|
|
57
|
+
];
|
|
28
58
|
this.convertedPlatforms = [];
|
|
29
59
|
/**
|
|
30
60
|
* page url that will be shared custom | current page url
|
|
31
61
|
*/
|
|
32
|
-
this.url =
|
|
62
|
+
this.url = '';
|
|
33
63
|
/**
|
|
34
64
|
* page url name that will be shared custom | current page url
|
|
35
65
|
*/
|
|
36
|
-
this.urlName =
|
|
66
|
+
this.urlName = '';
|
|
37
67
|
/**
|
|
38
68
|
* selected platforms to share | all platforms
|
|
39
69
|
*/
|
|
40
70
|
this.platforms = 'facebook,twitter,whatsapp,email,copy_link';
|
|
71
|
+
/**
|
|
72
|
+
* Share UI variant: `default` dropdown menu or centered `modal` dialog.
|
|
73
|
+
*/
|
|
74
|
+
this.mode = 'default';
|
|
75
|
+
/**
|
|
76
|
+
* Optional title for the modal variant header. Defaults to a localized "Share".
|
|
77
|
+
*/
|
|
78
|
+
this.modalTitle = '';
|
|
41
79
|
}
|
|
42
80
|
componentWillLoad() {
|
|
81
|
+
this.registerTranslationDefaults();
|
|
43
82
|
if (this.host.hasAttribute('aria-label')) {
|
|
44
83
|
this.host.removeAttribute('aria-label');
|
|
45
84
|
}
|
|
@@ -54,50 +93,123 @@ export class SallaSocialShare {
|
|
|
54
93
|
window.a2a_config.locale = salla.config.get('user.language_code', salla.lang.getLocale());
|
|
55
94
|
window.a2a_config.callbacks = window.a2a_config.callbacks || [];
|
|
56
95
|
window.a2a_config.callbacks.push({
|
|
57
|
-
share:
|
|
96
|
+
share: data => {
|
|
58
97
|
// Handle share event
|
|
59
98
|
const shareData = {
|
|
60
99
|
share_via: data.service.toLowerCase(),
|
|
61
100
|
url: data.url,
|
|
62
|
-
title: data.title
|
|
101
|
+
title: data.title,
|
|
63
102
|
};
|
|
64
103
|
// Dispatch the share event
|
|
65
104
|
salla.event.emit('share-element', shareData);
|
|
66
|
-
}
|
|
105
|
+
},
|
|
67
106
|
});
|
|
68
107
|
};
|
|
69
108
|
document.body.appendChild(script);
|
|
70
109
|
}
|
|
110
|
+
componentDidLoad() {
|
|
111
|
+
document.addEventListener('click', this.onDocumentClick);
|
|
112
|
+
}
|
|
113
|
+
disconnectedCallback() {
|
|
114
|
+
document.removeEventListener('click', this.onDocumentClick);
|
|
115
|
+
if (this.copiedResetTimeout) {
|
|
116
|
+
window.clearTimeout(this.copiedResetTimeout);
|
|
117
|
+
}
|
|
118
|
+
this.setBodyScrollLocked(false);
|
|
119
|
+
}
|
|
71
120
|
/**
|
|
72
|
-
*
|
|
121
|
+
* Register bilingual (ar/en) defaults without overriding existing translations.
|
|
122
|
+
*/
|
|
123
|
+
registerTranslationDefaults() {
|
|
124
|
+
if (!salla?.lang?.addBulk) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
const missing = Object.entries(this.translationDefaults).reduce((acc, [key, value]) => {
|
|
128
|
+
if (salla.lang.get(key) === key) {
|
|
129
|
+
acc[key] = value;
|
|
130
|
+
}
|
|
131
|
+
return acc;
|
|
132
|
+
}, {});
|
|
133
|
+
if (Object.keys(missing).length) {
|
|
134
|
+
salla.lang.addBulk(missing);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
resolveShareKit() {
|
|
138
|
+
return this.host.querySelector('.a2a_kit');
|
|
139
|
+
}
|
|
140
|
+
deferOutsideClickGuard() {
|
|
141
|
+
this.ignoreOutsideClick = true;
|
|
142
|
+
requestAnimationFrame(() => {
|
|
143
|
+
this.ignoreOutsideClick = false;
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Open the share menu.
|
|
73
148
|
*/
|
|
74
149
|
async open() {
|
|
75
|
-
|
|
76
|
-
|
|
150
|
+
if (this.opened) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
this.opened = true;
|
|
154
|
+
this.deferOutsideClickGuard();
|
|
155
|
+
if (this.mode === 'modal') {
|
|
156
|
+
this.setBodyScrollLocked(true);
|
|
157
|
+
}
|
|
158
|
+
await new Promise(resolve => requestAnimationFrame(() => resolve()));
|
|
159
|
+
if (!this.opened) {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
// Wire AddToAny on the freshly rendered anchors (kit only exists once opened).
|
|
163
|
+
await this.refresh();
|
|
164
|
+
if (this.mode === 'modal') {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
const menu = this.resolveShareKit();
|
|
168
|
+
if (!menu) {
|
|
169
|
+
this.opened = false;
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
this.openAnimation = new anime.timeline().add({
|
|
173
|
+
targets: menu,
|
|
77
174
|
translateY: [-50, 0],
|
|
78
175
|
opacity: [0, 1],
|
|
79
176
|
duration: 300,
|
|
80
177
|
podding: '0',
|
|
81
|
-
easing: 'easeInOutSine'
|
|
178
|
+
easing: 'easeInOutSine',
|
|
82
179
|
});
|
|
83
|
-
|
|
84
|
-
targets:
|
|
180
|
+
this.openAnimation.add({
|
|
181
|
+
targets: menu.children,
|
|
85
182
|
translateZ: 0,
|
|
86
183
|
translateY: [-30, 0],
|
|
87
184
|
scaleY: [0, 1],
|
|
88
185
|
opacity: [0, 1],
|
|
89
186
|
duration: 1400,
|
|
90
|
-
delay: anime.stagger(100)
|
|
187
|
+
delay: anime.stagger(100),
|
|
91
188
|
}, '-=200');
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Close the share menu.
|
|
192
|
+
*/
|
|
193
|
+
async close() {
|
|
194
|
+
if (!this.opened) {
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
this.openAnimation?.pause();
|
|
198
|
+
this.openAnimation?.seek(0);
|
|
199
|
+
this.opened = false;
|
|
200
|
+
if (this.mode === 'modal') {
|
|
201
|
+
this.setBodyScrollLocked(false);
|
|
95
202
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
203
|
+
}
|
|
204
|
+
setBodyScrollLocked(locked) {
|
|
205
|
+
document.body.classList.toggle('s-social-share-modal-is-open', locked);
|
|
206
|
+
}
|
|
207
|
+
toggle() {
|
|
208
|
+
if (this.opened) {
|
|
209
|
+
return this.close();
|
|
100
210
|
}
|
|
211
|
+
this.deferOutsideClickGuard();
|
|
212
|
+
return this.open();
|
|
101
213
|
}
|
|
102
214
|
/**
|
|
103
215
|
* Asynchronously initializes the "AddToAny" (a2a) social sharing tool on the current page.
|
|
@@ -117,18 +229,123 @@ export class SallaSocialShare {
|
|
|
117
229
|
* @async
|
|
118
230
|
* @returns {Promise<void>} A promise that resolves once the initialization is complete.
|
|
119
231
|
*/
|
|
232
|
+
onUrlChanged(newUrl, oldUrl) {
|
|
233
|
+
if (newUrl !== oldUrl) {
|
|
234
|
+
void this.refresh();
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
getShareUrl() {
|
|
238
|
+
return this.url || window.location.href;
|
|
239
|
+
}
|
|
240
|
+
getModalTitle() {
|
|
241
|
+
return this.modalTitle || salla.lang.get('common.social.share');
|
|
242
|
+
}
|
|
243
|
+
syncShareAttributes() {
|
|
244
|
+
const kit = this.resolveShareKit();
|
|
245
|
+
if (!kit) {
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
kit.setAttribute('data-a2a-url', this.getShareUrl());
|
|
249
|
+
kit.setAttribute('data-a2a-title', this.urlName || document.title);
|
|
250
|
+
}
|
|
120
251
|
async refresh() {
|
|
121
|
-
|
|
252
|
+
this.syncShareAttributes();
|
|
253
|
+
// Re-scan kits so AddToAny picks up the updated data-a2a-url (init caches the first URL).
|
|
254
|
+
if (typeof window.a2a?.init_all === 'function') {
|
|
255
|
+
window.a2a.init_all();
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
122
258
|
window.a2a?.init('page');
|
|
123
259
|
}
|
|
124
|
-
|
|
125
|
-
|
|
260
|
+
async copyLink() {
|
|
261
|
+
const url = this.getShareUrl();
|
|
262
|
+
try {
|
|
263
|
+
await navigator.clipboard.writeText(url);
|
|
264
|
+
}
|
|
265
|
+
catch {
|
|
266
|
+
const textarea = document.createElement('textarea');
|
|
267
|
+
textarea.value = url;
|
|
268
|
+
textarea.style.position = 'fixed';
|
|
269
|
+
textarea.style.opacity = '0';
|
|
270
|
+
document.body.appendChild(textarea);
|
|
271
|
+
textarea.select();
|
|
272
|
+
try {
|
|
273
|
+
document.execCommand('copy');
|
|
274
|
+
}
|
|
275
|
+
catch {
|
|
276
|
+
/* noop */
|
|
277
|
+
}
|
|
278
|
+
textarea.remove();
|
|
279
|
+
}
|
|
280
|
+
salla.event.emit('share-element', {
|
|
281
|
+
share_via: 'copy_link',
|
|
282
|
+
url,
|
|
283
|
+
title: this.urlName || document.title,
|
|
284
|
+
});
|
|
285
|
+
this.copied = true;
|
|
286
|
+
if (this.copiedResetTimeout) {
|
|
287
|
+
window.clearTimeout(this.copiedResetTimeout);
|
|
288
|
+
}
|
|
289
|
+
this.copiedResetTimeout = window.setTimeout(() => (this.copied = false), 2000);
|
|
290
|
+
}
|
|
291
|
+
modalPlatformMeta(platform) {
|
|
292
|
+
switch (platform) {
|
|
293
|
+
case Socials.WHATSAPP:
|
|
294
|
+
return {
|
|
295
|
+
icon: whatsapp,
|
|
296
|
+
color: '#25D366',
|
|
297
|
+
label: salla.lang.get('common.social.whatsapp'),
|
|
298
|
+
};
|
|
299
|
+
case Socials.FACEBOOK:
|
|
300
|
+
return {
|
|
301
|
+
icon: facebook,
|
|
302
|
+
color: '#1877F2',
|
|
303
|
+
label: salla.lang.get('common.social.facebook'),
|
|
304
|
+
};
|
|
305
|
+
case Socials.TWITTER:
|
|
306
|
+
return { icon: twitter, color: '#000000', label: salla.lang.get('common.social.twitter') };
|
|
307
|
+
case Socials.EMAIL:
|
|
308
|
+
return { icon: email, color: '#2BA6FF', label: salla.lang.get('common.social.email') };
|
|
309
|
+
default:
|
|
310
|
+
return { icon: copy_link, color: '#6b7280', label: platform };
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
renderModalCard(platform) {
|
|
314
|
+
const meta = this.modalPlatformMeta(platform);
|
|
315
|
+
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)));
|
|
316
|
+
}
|
|
317
|
+
renderModal() {
|
|
318
|
+
if (!this.opened) {
|
|
319
|
+
return null;
|
|
320
|
+
}
|
|
321
|
+
const enabled = this.platforms.split(',').map(platform => platform.trim());
|
|
322
|
+
const order = [Socials.EMAIL, Socials.WHATSAPP, Socials.TWITTER, Socials.FACEBOOK];
|
|
323
|
+
const platforms = order.filter(platform => enabled.includes(platform));
|
|
324
|
+
const showCopy = enabled.includes(Socials.COPY_LINK);
|
|
325
|
+
return (h("div", { class: "s-social-share-modal", onClick: event => {
|
|
326
|
+
if (event.target === event.currentTarget) {
|
|
327
|
+
void this.close();
|
|
328
|
+
}
|
|
329
|
+
} }, 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
|
|
330
|
+
? salla.lang.get('common.social.copied')
|
|
331
|
+
: salla.lang.get('common.social.copy')))))));
|
|
332
|
+
}
|
|
333
|
+
renderPopupList() {
|
|
334
|
+
return (h("ul", { class: {
|
|
335
|
+
's-social-share-list': true,
|
|
336
|
+
a2a_kit: true,
|
|
337
|
+
share: true,
|
|
338
|
+
opened: this.opened,
|
|
339
|
+
}, "data-a2a-url": this.getShareUrl(), "data-a2a-title": this.urlName ? this.urlName : document.title }, this.platforms.split(',').map(platform => {
|
|
126
340
|
return (h("li", null, h("a", { class: `a2a_button_${platform}`, "aria-label": `Share Via ${platform}` }, this.platformIcons.map((icon) => {
|
|
127
341
|
if (icon.name === platform) {
|
|
128
342
|
return h("span", { class: "s-social-share-icon", innerHTML: icon.icon });
|
|
129
343
|
}
|
|
130
344
|
}))));
|
|
131
|
-
})))
|
|
345
|
+
})));
|
|
346
|
+
}
|
|
347
|
+
render() {
|
|
348
|
+
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()));
|
|
132
349
|
}
|
|
133
350
|
static get is() { return "salla-social-share"; }
|
|
134
351
|
static get originalStyleUrls() {
|
|
@@ -146,7 +363,7 @@ export class SallaSocialShare {
|
|
|
146
363
|
"url": {
|
|
147
364
|
"type": "string",
|
|
148
365
|
"attribute": "url",
|
|
149
|
-
"mutable":
|
|
366
|
+
"mutable": true,
|
|
150
367
|
"complexType": {
|
|
151
368
|
"original": "string",
|
|
152
369
|
"resolved": "string",
|
|
@@ -161,7 +378,7 @@ export class SallaSocialShare {
|
|
|
161
378
|
"getter": false,
|
|
162
379
|
"setter": false,
|
|
163
380
|
"reflect": true,
|
|
164
|
-
"defaultValue": "
|
|
381
|
+
"defaultValue": "''"
|
|
165
382
|
},
|
|
166
383
|
"urlName": {
|
|
167
384
|
"type": "string",
|
|
@@ -181,7 +398,7 @@ export class SallaSocialShare {
|
|
|
181
398
|
"getter": false,
|
|
182
399
|
"setter": false,
|
|
183
400
|
"reflect": true,
|
|
184
|
-
"defaultValue": "
|
|
401
|
+
"defaultValue": "''"
|
|
185
402
|
},
|
|
186
403
|
"platforms": {
|
|
187
404
|
"type": "string",
|
|
@@ -202,12 +419,53 @@ export class SallaSocialShare {
|
|
|
202
419
|
"setter": false,
|
|
203
420
|
"reflect": true,
|
|
204
421
|
"defaultValue": "'facebook,twitter,whatsapp,email,copy_link'"
|
|
422
|
+
},
|
|
423
|
+
"mode": {
|
|
424
|
+
"type": "string",
|
|
425
|
+
"attribute": "mode",
|
|
426
|
+
"mutable": false,
|
|
427
|
+
"complexType": {
|
|
428
|
+
"original": "'modal' | 'default'",
|
|
429
|
+
"resolved": "\"default\" | \"modal\"",
|
|
430
|
+
"references": {}
|
|
431
|
+
},
|
|
432
|
+
"required": false,
|
|
433
|
+
"optional": false,
|
|
434
|
+
"docs": {
|
|
435
|
+
"tags": [],
|
|
436
|
+
"text": "Share UI variant: `default` dropdown menu or centered `modal` dialog."
|
|
437
|
+
},
|
|
438
|
+
"getter": false,
|
|
439
|
+
"setter": false,
|
|
440
|
+
"reflect": true,
|
|
441
|
+
"defaultValue": "'default'"
|
|
442
|
+
},
|
|
443
|
+
"modalTitle": {
|
|
444
|
+
"type": "string",
|
|
445
|
+
"attribute": "modal-title",
|
|
446
|
+
"mutable": false,
|
|
447
|
+
"complexType": {
|
|
448
|
+
"original": "string",
|
|
449
|
+
"resolved": "string",
|
|
450
|
+
"references": {}
|
|
451
|
+
},
|
|
452
|
+
"required": false,
|
|
453
|
+
"optional": false,
|
|
454
|
+
"docs": {
|
|
455
|
+
"tags": [],
|
|
456
|
+
"text": "Optional title for the modal variant header. Defaults to a localized \"Share\"."
|
|
457
|
+
},
|
|
458
|
+
"getter": false,
|
|
459
|
+
"setter": false,
|
|
460
|
+
"reflect": false,
|
|
461
|
+
"defaultValue": "''"
|
|
205
462
|
}
|
|
206
463
|
};
|
|
207
464
|
}
|
|
208
465
|
static get states() {
|
|
209
466
|
return {
|
|
210
467
|
"opened": {},
|
|
468
|
+
"copied": {},
|
|
211
469
|
"allPlatforms": {},
|
|
212
470
|
"platformIcons": {},
|
|
213
471
|
"convertedPlatforms": {}
|
|
@@ -228,7 +486,24 @@ export class SallaSocialShare {
|
|
|
228
486
|
"return": "Promise<void>"
|
|
229
487
|
},
|
|
230
488
|
"docs": {
|
|
231
|
-
"text": "
|
|
489
|
+
"text": "Open the share menu.",
|
|
490
|
+
"tags": []
|
|
491
|
+
}
|
|
492
|
+
},
|
|
493
|
+
"close": {
|
|
494
|
+
"complexType": {
|
|
495
|
+
"signature": "() => Promise<void>",
|
|
496
|
+
"parameters": [],
|
|
497
|
+
"references": {
|
|
498
|
+
"Promise": {
|
|
499
|
+
"location": "global",
|
|
500
|
+
"id": "global::Promise"
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
"return": "Promise<void>"
|
|
504
|
+
},
|
|
505
|
+
"docs": {
|
|
506
|
+
"text": "Close the share menu.",
|
|
232
507
|
"tags": []
|
|
233
508
|
}
|
|
234
509
|
},
|
|
@@ -245,26 +520,17 @@ export class SallaSocialShare {
|
|
|
245
520
|
"return": "Promise<void>"
|
|
246
521
|
},
|
|
247
522
|
"docs": {
|
|
248
|
-
"text": "
|
|
249
|
-
"tags": [
|
|
250
|
-
"name": "remarks",
|
|
251
|
-
"text": "This function is designed to be used in scenarios where dynamic loading or refreshing of social sharing tools is needed.\nEnsure that the AddToAny script is properly included in the HTML document before calling this function."
|
|
252
|
-
}, {
|
|
253
|
-
"name": "example",
|
|
254
|
-
"text": "// Call the refresh function to initialize AddToAny on the page.\nawait refresh();"
|
|
255
|
-
}, {
|
|
256
|
-
"name": "throws",
|
|
257
|
-
"text": "{Error} Throws an error if the AddToAny script is not properly included or if there are issues during initialization."
|
|
258
|
-
}, {
|
|
259
|
-
"name": "async",
|
|
260
|
-
"text": undefined
|
|
261
|
-
}, {
|
|
262
|
-
"name": "returns",
|
|
263
|
-
"text": "A promise that resolves once the initialization is complete."
|
|
264
|
-
}]
|
|
523
|
+
"text": "",
|
|
524
|
+
"tags": []
|
|
265
525
|
}
|
|
266
526
|
}
|
|
267
527
|
};
|
|
268
528
|
}
|
|
269
529
|
static get elementRef() { return "host"; }
|
|
530
|
+
static get watchers() {
|
|
531
|
+
return [{
|
|
532
|
+
"propName": "url",
|
|
533
|
+
"methodName": "onUrlChanged"
|
|
534
|
+
}];
|
|
535
|
+
}
|
|
270
536
|
}
|
|
@@ -30,7 +30,7 @@ export class SallaTabContent {
|
|
|
30
30
|
's-tabs-content': true,
|
|
31
31
|
's-tabs-content-selected': this.isSelected
|
|
32
32
|
};
|
|
33
|
-
return (h("div", { key: '
|
|
33
|
+
return (h("div", { key: 'f2deb9c1508aafe3aff5352094cccc97bdcd42ef', class: classes }, h("slot", { key: '460588864047444acdb06e757a7124d28935c24b' })));
|
|
34
34
|
}
|
|
35
35
|
static get is() { return "salla-tab-content"; }
|
|
36
36
|
static get originalStyleUrls() {
|
|
@@ -52,7 +52,7 @@ export class SallaTabHeader {
|
|
|
52
52
|
's-tabs-active': this.isSelected,
|
|
53
53
|
};
|
|
54
54
|
return [
|
|
55
|
-
h("div", { key: '
|
|
55
|
+
h("div", { key: '153247ab5a7c73819ccc506a45e60b9c084c391c', class: classes, onClick: this.onClick.bind(this) }, h("slot", { key: '417a3ae0c0aec8a965b5d3be9a4f917f290d2109' })),
|
|
56
56
|
];
|
|
57
57
|
}
|
|
58
58
|
static get is() { return "salla-tab-header"; }
|
|
@@ -50,7 +50,7 @@ export class SallaTabs {
|
|
|
50
50
|
}
|
|
51
51
|
render() {
|
|
52
52
|
return [
|
|
53
|
-
h("div", { key: '
|
|
53
|
+
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" })))
|
|
54
54
|
];
|
|
55
55
|
}
|
|
56
56
|
static get is() { return "salla-tabs"; }
|