@salla.sa/twilight-components 2.14.467 → 2.14.469
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-CG7dNZgq.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-CXgEvsrj.js → filepond-plugin-file-poster-B1zrjwgr.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-DISjKBXN.js → filepond-plugin-file-validate-size-BqZtoWbe.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-BeDqb2RU.js → filepond-plugin-file-validate-type-BGmGKK9L.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-CTKgasCY.js → filepond-plugin-image-edit-CYeh6qmG.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-BqvyVbfM.js → filepond-plugin-image-exif-orientation-BEVpo-ZQ.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-DfX-wD-s.js → filepond-plugin-image-preview-C7MMEZFE.js} +1 -1
- package/dist/cjs/{functions-DXNacMtu.js → functions-CnBVKKGk.js} +1 -1
- package/dist/cjs/{index-2n84VIdz.js → index-BNOCK3IN.js} +1 -1
- package/dist/cjs/{index-JuURs8Nc.js → index-inmL4H71.js} +9 -5
- 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 +85 -31
- 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-DvLhM2Sx.js} +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-Cj5ogibZ.js → vanilla-picker-DtuN6WGq.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.css +18 -0
- package/dist/collection/components/salla-gifting/salla-gifting.js +91 -31
- 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 +86 -30
- 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-D4dDq1wa.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-CVurRtjC.js → filepond-plugin-file-poster-CcnsMPSH.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-Dw2xFbfx.js → filepond-plugin-file-validate-size-qgEgRYkk.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-D6seJVa2.js → filepond-plugin-file-validate-type-BuFGnco8.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-CBikW78V.js → filepond-plugin-image-edit-kS2Sie2d.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-5yNhe9TO.js → filepond-plugin-image-exif-orientation-Bjoh_of2.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-PlAAXB7f.js → filepond-plugin-image-preview-b_VEHHGf.js} +1 -1
- package/dist/esm/{functions-Egzz8fEM.js → functions-ISZQDw0y.js} +1 -1
- package/dist/esm/{index-Do4FV1UZ.js → index-CqC4wD_f.js} +1 -1
- package/dist/esm/{index-a4x9urdK.js → index-Cqh-ta1v.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 +85 -31
- 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-CH_UyK-l.js} +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-DB0pDHa7.js → vanilla-picker-PE31tu9y.js} +1 -1
- package/dist/twilight/{p-afcb0117.entry.js → p-054c9462.entry.js} +1 -1
- package/dist/twilight/{p-78020271.entry.js → p-06372aeb.entry.js} +1 -1
- package/dist/twilight/p-06c06719.entry.js +4 -0
- package/dist/twilight/{p-16bcc5ab.entry.js → p-0c7efc0b.entry.js} +1 -1
- package/dist/twilight/{p-53cbb271.entry.js → p-0cca1b63.entry.js} +1 -1
- package/dist/twilight/{p-ad19661d.entry.js → p-1415eb5e.entry.js} +1 -1
- package/dist/twilight/{p-a53d5944.entry.js → p-14a3277b.entry.js} +1 -1
- package/dist/twilight/{p-92b02f3c.entry.js → p-15b3f969.entry.js} +1 -1
- package/dist/twilight/{p-241bd42e.entry.js → p-16b64bb5.entry.js} +1 -1
- package/dist/twilight/{p-37457147.entry.js → p-16c64a38.entry.js} +1 -1
- package/dist/twilight/{p-f5135cb5.entry.js → p-17920aa7.entry.js} +1 -1
- package/dist/twilight/{p-ec5ae058.entry.js → p-196fad8d.entry.js} +1 -1
- package/dist/twilight/{p-5803c158.entry.js → p-19fe2b27.entry.js} +1 -1
- package/dist/twilight/{p-316135f8.entry.js → p-1c0f9fd9.entry.js} +1 -1
- package/dist/twilight/{p-1130d4b7.entry.js → p-1db8b515.entry.js} +1 -1
- package/dist/twilight/{p-d0340e11.entry.js → p-219b14c4.entry.js} +1 -1
- package/dist/twilight/{p-127ee640.entry.js → p-227d11a0.entry.js} +1 -1
- package/dist/twilight/p-293a6d6b.entry.js +4 -0
- package/dist/twilight/{p-0c748664.entry.js → p-2ba603bc.entry.js} +1 -1
- package/dist/twilight/p-2dbb3b49.entry.js +4 -0
- package/dist/twilight/{p-5b365561.entry.js → p-31bd852c.entry.js} +1 -1
- package/dist/twilight/{p-92f3ea44.entry.js → p-32a7cb85.entry.js} +1 -1
- package/dist/twilight/{p-1a37b959.entry.js → p-32d5d279.entry.js} +1 -1
- package/dist/twilight/{p-91363b7e.entry.js → p-36884c05.entry.js} +1 -1
- package/dist/twilight/{p-13a033fa.entry.js → p-38a791cb.entry.js} +1 -1
- package/dist/twilight/{p-0b169d4e.entry.js → p-3b198162.entry.js} +1 -1
- package/dist/twilight/{p-735fafef.entry.js → p-3d517178.entry.js} +1 -1
- package/dist/twilight/{p-d9d4ea5b.entry.js → p-3e5a57cc.entry.js} +1 -1
- package/dist/twilight/{p-fa1cc092.entry.js → p-40eb9556.entry.js} +6 -6
- package/dist/twilight/{p-1ce817c2.entry.js → p-49181c4a.entry.js} +1 -1
- package/dist/twilight/p-4a81a708.entry.js +4 -0
- package/dist/twilight/{p-35ac1fc9.entry.js → p-4b20872a.entry.js} +1 -1
- package/dist/twilight/{p-e27363dd.entry.js → p-4c370853.entry.js} +1 -1
- package/dist/twilight/{p-e1205d19.entry.js → p-4ee20a54.entry.js} +1 -1
- package/dist/twilight/{p-b0bf7a5b.entry.js → p-51c30ec2.entry.js} +1 -1
- package/dist/twilight/{p-2bcfb4f3.entry.js → p-5334222c.entry.js} +1 -1
- package/dist/twilight/{p-c0380d40.entry.js → p-559bdcca.entry.js} +1 -1
- package/dist/twilight/{p-03d13b9f.entry.js → p-5701244a.entry.js} +1 -1
- package/dist/twilight/{p-0da78d4e.entry.js → p-5d364fc2.entry.js} +1 -1
- package/dist/twilight/{p-DiWHgCMH.js → p-5fxCpxw5.js} +1 -1
- package/dist/twilight/{p-08b2c781.entry.js → p-61ad2660.entry.js} +1 -1
- package/dist/twilight/p-6590acee.entry.js +4 -0
- package/dist/twilight/{p-b8ab7da8.entry.js → p-681f8874.entry.js} +1 -1
- package/dist/twilight/{p-d17596ff.entry.js → p-6b6f9822.entry.js} +1 -1
- package/dist/twilight/{p-4d393389.entry.js → p-6d23fd92.entry.js} +1 -1
- package/dist/twilight/p-6e723d46.entry.js +4 -0
- package/dist/twilight/{p-d33203b7.entry.js → p-71f2ba66.entry.js} +1 -1
- package/dist/twilight/{p-c8fd03c0.entry.js → p-732bd9fb.entry.js} +1 -1
- package/dist/twilight/{p-42a0b54a.entry.js → p-73d9e4c8.entry.js} +1 -1
- package/dist/twilight/{p-e90d18b2.entry.js → p-74e0d0c2.entry.js} +1 -1
- package/dist/twilight/{p-52fe97c8.entry.js → p-77d2312a.entry.js} +1 -1
- package/dist/twilight/{p-635347c9.entry.js → p-78ff445c.entry.js} +1 -1
- package/dist/twilight/{p-74a61155.entry.js → p-798fb3c7.entry.js} +1 -1
- package/dist/twilight/{p-e726123e.entry.js → p-79c20964.entry.js} +1 -1
- package/dist/twilight/{p-C4aFleDM.js → p-7FtjQghq.js} +1 -1
- package/dist/twilight/{p-0405f5e8.entry.js → p-7afe6e1a.entry.js} +1 -1
- package/dist/twilight/{p-b80adb19.entry.js → p-7e185acf.entry.js} +1 -1
- package/dist/twilight/{p-f684d7bf.entry.js → p-8b538bd7.entry.js} +1 -1
- package/dist/twilight/{p-bfbf8121.entry.js → p-8bcc3b86.entry.js} +1 -1
- package/dist/twilight/{p-a068fff4.entry.js → p-8db52fe9.entry.js} +1 -1
- package/dist/twilight/{p-89f11893.entry.js → p-93ec294d.entry.js} +1 -1
- package/dist/twilight/p-9785f314.entry.js +4 -0
- package/dist/twilight/{p-ff270706.entry.js → p-9a3f27e9.entry.js} +1 -1
- package/dist/twilight/{p-DSBkBAFI.js → p-B0uENqSF.js} +1 -1
- package/dist/twilight/{p-B7KW0zhB.js → p-C3kw3FEZ.js} +1 -1
- package/dist/twilight/{p-BVqg7xd9.js → p-CUfwD9kr.js} +1 -1
- package/dist/twilight/{p-a4x9urdK.js → p-Cqh-ta1v.js} +2 -2
- package/dist/twilight/{p-fCaOxwGH.js → p-DZ18vMT2.js} +1 -1
- package/dist/twilight/{p-EPfEwqOC.js → p-DyQ5MH6F.js} +1 -1
- package/dist/twilight/{p-DLNIOD9t.js → p-DzAIgzdz.js} +1 -1
- package/dist/twilight/{p-pOgjUtf9.js → p-J_27I63T.js} +1 -1
- package/dist/twilight/{p-10e0936d.entry.js → p-a85d80b5.entry.js} +1 -1
- package/dist/twilight/{p-6d47892b.entry.js → p-a918b812.entry.js} +1 -1
- package/dist/twilight/{p-ba1199ba.entry.js → p-aec0a2df.entry.js} +1 -1
- package/dist/twilight/{p-9b639078.entry.js → p-b16d8b19.entry.js} +1 -1
- package/dist/twilight/{p-ee605cef.entry.js → p-b295c1f1.entry.js} +1 -1
- package/dist/twilight/{p-0957f323.entry.js → p-b6c0aa79.entry.js} +1 -1
- package/dist/twilight/{p-0bdf58a4.entry.js → p-b7727021.entry.js} +1 -1
- package/dist/twilight/{p-e8a82952.entry.js → p-badf4c9d.entry.js} +1 -1
- package/dist/twilight/{p-fe506679.entry.js → p-c6be8afd.entry.js} +1 -1
- package/dist/twilight/{p-ec073354.entry.js → p-ccd8c960.entry.js} +1 -1
- package/dist/twilight/{p-3fbd88d0.entry.js → p-ce0410d5.entry.js} +1 -1
- package/dist/twilight/{p-ef8fb222.entry.js → p-cee7a8ad.entry.js} +1 -1
- package/dist/twilight/{p-f6bb956c.entry.js → p-d0c8435f.entry.js} +1 -1
- package/dist/twilight/{p-59f815bc.entry.js → p-d23eeb0c.entry.js} +1 -1
- package/dist/twilight/{p-f170aff7.entry.js → p-d63f2cbd.entry.js} +1 -1
- package/dist/twilight/{p-6d87b134.entry.js → p-d6b6a8ad.entry.js} +1 -1
- package/dist/twilight/{p-b0ed6a9f.entry.js → p-d823cbcd.entry.js} +1 -1
- package/dist/twilight/{p-9df5c9a7.entry.js → p-d8f22e4b.entry.js} +1 -1
- package/dist/twilight/{p-CsMnvJkR.js → p-dKdk2xpB.js} +1 -1
- package/dist/twilight/p-dbdbb882.entry.js +4 -0
- package/dist/twilight/{p-d905fbca.entry.js → p-dc8555bf.entry.js} +1 -1
- package/dist/twilight/{p-fbfacb11.entry.js → p-dca3b67e.entry.js} +1 -1
- package/dist/twilight/{p-056400a1.entry.js → p-e0671ff1.entry.js} +1 -1
- package/dist/twilight/{p-59f7f014.entry.js → p-e06e37c1.entry.js} +1 -1
- package/dist/twilight/{p-c60c302f.entry.js → p-e265d626.entry.js} +1 -1
- package/dist/twilight/{p-61b1fd3b.entry.js → p-f0e96875.entry.js} +1 -1
- package/dist/twilight/p-f64168cc.entry.js +4 -0
- package/dist/twilight/{p-0b1970c2.entry.js → p-f67639df.entry.js} +1 -1
- package/dist/twilight/{p-fa039238.entry.js → p-fd180bd3.entry.js} +1 -1
- package/dist/twilight/{p-D9ni3BuG.js → p-m2p-QAbu.js} +1 -1
- package/dist/twilight/{p-CkA6UKAD.js → p-yyvPGK6r.js} +2 -2
- 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 +5 -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-7a1cfd65.entry.js +0 -4
- package/dist/twilight/p-865c602e.entry.js +0 -4
- package/dist/twilight/p-9dc0fec4.entry.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
- package/dist/twilight/p-fdde8399.entry.js +0 -4
|
@@ -129,7 +129,7 @@ const SallaTelInput = /*@__PURE__*/ proxyCustomElement(class SallaTelInput exten
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
render() {
|
|
132
|
-
return (h(Host, { key: '
|
|
132
|
+
return (h(Host, { key: '278424c0918dc3c4b6aac8da5817376d784995ac', class: "s-tel-input" }, h("input", { key: '00ff8ed40ff9aabe9bea6cfd43c41f5b2cfc5529', type: "tel", disabled: this.disabled, name: this.name, value: this.phone, onChange: (event) => this.handleCountryInput(event), ref: el => this.phoneInput = el, enterkeyhint: "next", autocomplete: "tel", class: "s-tel-input-control tel-input s-ltr" }), h("span", { key: '68e791d4d1b6490a84a3ef31c75f41be90ac5bb6', class: "s-tel-input-error-msg", ref: el => this.errorMsg = el }), h("input", { key: '415e6521c2ef756ebabbeb4610c06158e255320d', type: "hidden", name: "country_code", value: this.countryCode, ref: el => this.countryCodeInput = el, class: "country_code" })));
|
|
133
133
|
}
|
|
134
134
|
componentDidLoad() {
|
|
135
135
|
this.initTelInput();
|
|
@@ -32,7 +32,7 @@ const SallaTooltip = /*@__PURE__*/ proxyCustomElement(class SallaTooltip extends
|
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
34
|
const validTheme = ['default', 'dark'].includes(this.theme) ? this.theme : 'default';
|
|
35
|
-
return (h("div", { key: '
|
|
35
|
+
return (h("div", { key: 'e5e8f78265e0abb1d4130fd084573c6cff1ecb2c', class: "s-tooltip-container" }, h("div", { key: '4dc98906dfd28c6e2d97b51329c07046eb15179c', class: `s-tooltip-item s-tooltip-item--${validTheme}`, style: { display: this.show ? 'block' : 'none' } }, this.text ? h("span", null, this.text) : h("slot", null))));
|
|
36
36
|
}
|
|
37
37
|
get el() { return this; }
|
|
38
38
|
static get style() { return sallaTooltipCss; }
|
|
@@ -83,7 +83,7 @@ const SallaUserSettings$1 = /*@__PURE__*/ proxyCustomElement(class SallaUserSett
|
|
|
83
83
|
await salla.profile.delete().finally(() => this.confirmationModal.close());
|
|
84
84
|
}
|
|
85
85
|
render() {
|
|
86
|
-
return (h(Host, { key: '
|
|
86
|
+
return (h(Host, { key: 'b37f8e7cd7fe59dfd4f4e1efe455e74d33d4b91e', class: "s-user-settings-wrapper" }, this.canHideName && h("div", { key: '7cf5f1ed489159ef1c754fc8368b390d35cc273d', class: "s-user-settings-section" }, h("salla-list-tile", { key: '961843ff5de245febf4b5d9d4a96d47b44aeaff3' }, h("div", { key: 'bdfa266ee2694e410ff2bc8d6ec31b5210e7bf08', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: '8ff08646cb3b3ba8d157f07cb4d54a6f515409a7', innerHTML: UserCancel })), h("div", { key: '8030d07722d9ad730676dafd1323b93a361f91da', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.hideMyName)), h("div", { key: 'f4c524dfe45418f0dd7395e998b1c16aa951a5f9', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.hideMyNameDesc)), h("div", { key: '74569032acb01ff1037104dcaf46f13c18c16803', slot: 'action', class: "s-user-settings-section-action" }, h("label", { key: '6002a8368a587dbd8d3fd3fc1231e52ee44ebbbe', class: "s-toggle" }, h("input", { key: '2e9a622f9a670ef0f314c6183c57c851334a7df5', class: "s-toggle-input", checked: this.isHiddenName, onChange: (e) => this.toggleSetting('is_hidden_name', e), type: "checkbox" }), h("div", { key: 'ca57daef65f550d53c1f947b41d3fb488bd38a95', class: "s-toggle-switcher" }))))), h("div", { key: 'b81a0200e08c0eca176060362792a45d9d7ad41e', class: "s-user-settings-section" }, h("salla-list-tile", { key: 'ebcdac4056d21cbbd218b246cdd6c5bfa7bc2ac3' }, h("div", { key: 'df3a675745a0945498f3f45e11016f9f9c71ce6d', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: 'b5accc798ca95bd803f9c721f96fe62ca27e8ecf', innerHTML: Bullhorn })), h("div", { key: 'fe82c42f7586ba892f14ed7b1d2f85e19c508e8c', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.promotionalMsgs)), h("div", { key: 'ec35e1a363a0802ab14a92b4bc8b858b9bf79c72', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.promotionalMsgsDesc)), h("div", { key: 'cc0d65144cfffc7fc795f3b1dde9ae6d75e827ec', slot: 'action', class: "s-user-settings-section-action" }, h("label", { key: '945d030759a2ab27b9e9379d96f879d299b0a444', class: "s-toggle" }, h("input", { key: '6dd35723f4e049263193d50d1488a300e26a166e', class: "s-toggle-input", checked: this.isNotifiable, onChange: (e) => this.toggleSetting('is_notifiable', e), type: "checkbox" }), h("div", { key: '1f529a32b220a0a5ba673fe41573786450e4f1b8', class: "s-toggle-switcher" }))))), h("div", { key: '9973aa99cd3944ced8e87da05a3711b9cde5faa4', class: "s-user-settings-section s-user-settings-section-deactivate-user" }, h("salla-list-tile", { key: '97ea806a1c5bc6e7f08ab04cdf555173d7e2c268' }, h("div", { key: 'fa98419cd6e11598c6e230ad462501f3dd66b975', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: '9bb7192d2bcdd942974a2a6e405878998e090f3c', innerHTML: UserOff })), h("div", { key: '9e79bfd50311f2ec272bc6d90224d2f81c736d8e', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.deactivateAccount)), h("div", { key: '805696292b1354bf57b0f0252eabd031dc4ac5db', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.deactivateDesc)), h("div", { key: '4984f94d2eef4870036d1bea837cbe16e9978d84', slot: 'action', class: "s-user-settings-section-action" }, h("salla-button", { key: '7be1eaf49fdb3df86b953a14879695c0c2eae838', fill: "outline", color: "danger", shape: "btn", size: "medium", width: "normal", onClick: () => this.openDeactivateModal() }, this.capitalizeText(this.deactivateAccount))))), h("salla-modal", { key: '55608c2fbfd01c328f923316aa203ebd6539ef86', width: "sm", subTitle: this.capitalizeText(this.sorryForLeavingText), ref: modal => this.confirmationModal = modal }, h("span", { key: '247bb5555b3aa936ab4815f16ec332f6d922ab49', slot: 'icon', class: "s-user-settings-confirmation-icon", innerHTML: UserOff }), h("div", { key: 'd8499d470dd0cce984687c9f6842970467b832a9', class: "s-user-settings-confirmation" }, h("div", { key: 'c4d98f4dc7591c53a0f4ab71fc1c7e0d446cebfc', class: "s-user-settings-confirmation-warning" }, this.capitalizeText(this.warningText)), h("div", { key: 'abebad572dab06b497451fff00a405e4c9db5652', class: "s-user-settings-confirmation-actions" }, h("salla-button", { key: 'bfde878cc657d975154f6e8b73220786b3898dbf', width: "wide", onClick: () => this.confirmationModal.close() }, this.capitalizeText(this.keepAccount)), h("salla-button", { key: 'b3334a9b6fda2aa6de6f66f610efbba8ae95910f', fill: 'outline', loading: this.buttonLoading, width: "wide", onClick: () => this.deleteAccount() }, this.capitalizeText(this.deactivateAccount)))))));
|
|
87
87
|
}
|
|
88
88
|
static get style() { return sallaUserSettingsCss; }
|
|
89
89
|
}, [0, "salla-user-settings", {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SallaWishlistActions extends Components.SallaWishlistActions, HTMLElement {}
|
|
4
|
+
export const SallaWishlistActions: {
|
|
5
|
+
prototype: SallaWishlistActions;
|
|
6
|
+
new (): SallaWishlistActions;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
5
|
+
import { d as defineCustomElement$3 } from './salla-button2.js';
|
|
6
|
+
import { d as defineCustomElement$2 } from './salla-social-share2.js';
|
|
7
|
+
|
|
8
|
+
const sallaWishlistActionsCss = ":host{display:block}.s-wishlist-actions-menu{min-width:200px;inset-inline-end:0;inset-inline-start:auto;list-style:none;margin:0;padding:4px 0;box-shadow:0 4px 16px rgba(0, 0, 0, 0.12)}.s-wishlist-actions-menu-item{display:block;width:100%;padding:10px 16px;text-align:start;font-size:0.875rem;color:#374151;background:transparent;cursor:pointer;white-space:nowrap}.s-wishlist-actions-menu-item:hover{background-color:#f3f4f6;color:var(--color-primary)}.s-wishlist-actions-panel{box-shadow:0 1px 3px rgba(0, 0, 0, 0.08)}.s-wishlist-actions-panel-select-all{user-select:none}.s-wishlist-actions-select-all:indeterminate,.s-wishlist-actions-select-all:indeterminate:hover,.s-wishlist-actions-select-all:indeterminate:focus{background-color:var(--color-primary);border-color:var(--color-primary)}.s-wishlist-actions-select-all:indeterminate::after{content:\"\";position:absolute;top:50%;left:50%;width:10px;height:2px;background:#fff;border:none;transform:translate(-50%, -50%)}.s-wishlist-actions-social-anchor{display:none}h1.s-wishlist-actions-page-title{text-align:start !important}";
|
|
9
|
+
|
|
10
|
+
const SallaWishlistActions$1 = /*@__PURE__*/ proxyCustomElement(class SallaWishlistActions extends HTMLElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
this.__registerHost();
|
|
14
|
+
this.menuOpen = false;
|
|
15
|
+
this.hasProducts = false;
|
|
16
|
+
/** Whether the "share specific items" selection mode is active. */
|
|
17
|
+
this.specificMode = false;
|
|
18
|
+
this.selectedIds = [];
|
|
19
|
+
this.loadedProductCount = 0;
|
|
20
|
+
this.isSharing = false;
|
|
21
|
+
this.shareUrl = '';
|
|
22
|
+
/** Ignore transient empty DOM while the products list reloads after toggling selection. */
|
|
23
|
+
this.isListSyncPaused = false;
|
|
24
|
+
/**
|
|
25
|
+
* Bilingual defaults for the translation keys introduced by this feature.
|
|
26
|
+
* Registered via `Salla.lang.addBulk` only when missing, so store/central
|
|
27
|
+
* translations always take precedence.
|
|
28
|
+
*/
|
|
29
|
+
this.translationDefaults = {
|
|
30
|
+
'pages.wishlist.share': { ar: 'شارك', en: 'Share' },
|
|
31
|
+
'pages.wishlist.share_all': { ar: 'مشاركة القائمة', en: 'Share the list' },
|
|
32
|
+
'pages.wishlist.share_specific': { ar: 'مشاركة منتجات محددة', en: 'Share specific items' },
|
|
33
|
+
'pages.wishlist.share_list_title': { ar: 'مشاركة قائمة الأمنيات', en: 'Share wishlist' },
|
|
34
|
+
'pages.wishlist.select_all': { ar: 'تحديد الكل', en: 'Select all' },
|
|
35
|
+
'common.elements.cancel': { ar: 'إلغاء', en: 'Cancel' },
|
|
36
|
+
};
|
|
37
|
+
this.onSelectionChanged = (detail) => {
|
|
38
|
+
this.selectedIds = detail?.ids || [];
|
|
39
|
+
this.shareUrl = '';
|
|
40
|
+
void this.socialShare?.close();
|
|
41
|
+
void this.syncLoadedProductCount();
|
|
42
|
+
};
|
|
43
|
+
this.onDocumentClick = (event) => {
|
|
44
|
+
if (this.menuOpen && !this.host.contains(event.target)) {
|
|
45
|
+
this.menuOpen = false;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
this.onProductsFetched = (response) => {
|
|
49
|
+
if (response?.source !== 'wishlist') {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
this.isListSyncPaused = false;
|
|
53
|
+
void this.syncHasProducts(!!response?.data?.length);
|
|
54
|
+
void this.syncLoadedProductCount();
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
async componentWillLoad() {
|
|
58
|
+
await Salla.onReady();
|
|
59
|
+
await Salla.lang.onLoaded();
|
|
60
|
+
this.registerTranslationDefaults();
|
|
61
|
+
this.loadTranslations();
|
|
62
|
+
Salla.event.on('salla-products-list::selection.changed', this.onSelectionChanged);
|
|
63
|
+
Salla.event.on('salla-products-list::products.fetched', this.onProductsFetched);
|
|
64
|
+
document.addEventListener('click', this.onDocumentClick);
|
|
65
|
+
}
|
|
66
|
+
componentDidLoad() {
|
|
67
|
+
this.initPageTitleAlignment();
|
|
68
|
+
this.productsList = this.host.parentElement?.querySelector('salla-products-list');
|
|
69
|
+
if (!this.productsList) {
|
|
70
|
+
Salla.logger?.warn?.('[salla-wishlist-actions] no sibling salla-products-list found');
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
void this.syncHasProducts();
|
|
74
|
+
this.productsObserver = new MutationObserver(() => void this.syncHasProducts());
|
|
75
|
+
this.productsObserver.observe(this.productsList, { childList: true, subtree: true });
|
|
76
|
+
}
|
|
77
|
+
disconnectedCallback() {
|
|
78
|
+
Salla.event.off('salla-products-list::selection.changed', this.onSelectionChanged);
|
|
79
|
+
Salla.event.off('salla-products-list::products.fetched', this.onProductsFetched);
|
|
80
|
+
document.removeEventListener('click', this.onDocumentClick);
|
|
81
|
+
this.productsObserver?.disconnect();
|
|
82
|
+
this.pageTitleObserver?.disconnect();
|
|
83
|
+
if (this.pageTitleRetryTimeout) {
|
|
84
|
+
window.clearTimeout(this.pageTitleRetryTimeout);
|
|
85
|
+
}
|
|
86
|
+
this.resetPageTitleAlignment();
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* The wishlist page title (`h1`) lives in theme markup outside this component.
|
|
90
|
+
* Alignment is handled by `h1.s-wishlist-actions-page-title` in the component stylesheet.
|
|
91
|
+
*/
|
|
92
|
+
initPageTitleAlignment() {
|
|
93
|
+
this.syncPageTitleAlignment();
|
|
94
|
+
if (this.pageTitle) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
requestAnimationFrame(() => this.syncPageTitleAlignment());
|
|
98
|
+
this.pageTitleRetryTimeout = window.setTimeout(() => this.syncPageTitleAlignment(), 300);
|
|
99
|
+
const observeRoot = this.host.closest('.main-content') ?? this.host.parentElement;
|
|
100
|
+
if (!observeRoot || this.pageTitle) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
this.pageTitleObserver = new MutationObserver(() => {
|
|
104
|
+
if (this.pageTitle) {
|
|
105
|
+
this.pageTitleObserver?.disconnect();
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
this.syncPageTitleAlignment();
|
|
109
|
+
if (this.pageTitle) {
|
|
110
|
+
this.pageTitleObserver?.disconnect();
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
this.pageTitleObserver.observe(observeRoot, { childList: true, subtree: true });
|
|
114
|
+
}
|
|
115
|
+
findPageTitle() {
|
|
116
|
+
const parent = this.host.parentElement;
|
|
117
|
+
if (parent) {
|
|
118
|
+
for (const child of Array.from(parent.children)) {
|
|
119
|
+
if (child === this.host) {
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
if (child.tagName === 'H1') {
|
|
123
|
+
return child;
|
|
124
|
+
}
|
|
125
|
+
const nestedTitle = child.querySelector('h1');
|
|
126
|
+
if (nestedTitle) {
|
|
127
|
+
return nestedTitle;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
const mainContent = this.host.closest('.main-content');
|
|
132
|
+
if (mainContent) {
|
|
133
|
+
const titleInMain = mainContent.querySelector('h1');
|
|
134
|
+
if (titleInMain && !this.host.contains(titleInMain)) {
|
|
135
|
+
return titleInMain;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return document.querySelector('.main-content h1, main h1');
|
|
139
|
+
}
|
|
140
|
+
syncPageTitleAlignment() {
|
|
141
|
+
if (this.pageTitle) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
const title = this.findPageTitle();
|
|
145
|
+
if (!title) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
this.pageTitle = title;
|
|
149
|
+
title.classList.add(SallaWishlistActions.pageTitleClass);
|
|
150
|
+
}
|
|
151
|
+
resetPageTitleAlignment() {
|
|
152
|
+
this.pageTitle?.classList.remove(SallaWishlistActions.pageTitleClass);
|
|
153
|
+
this.pageTitle = undefined;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Register bilingual (ar/en) defaults for our keys, without overriding any
|
|
157
|
+
* translation that already exists in the store/central translations.
|
|
158
|
+
*/
|
|
159
|
+
registerTranslationDefaults() {
|
|
160
|
+
const missing = Object.entries(this.translationDefaults).reduce((acc, [key, value]) => {
|
|
161
|
+
// `get` returns the key itself when no translation is found.
|
|
162
|
+
if (Salla.lang.get(key) === key) {
|
|
163
|
+
acc[key] = value;
|
|
164
|
+
}
|
|
165
|
+
return acc;
|
|
166
|
+
}, {});
|
|
167
|
+
if (Object.keys(missing).length) {
|
|
168
|
+
Salla.lang.addBulk(missing);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
loadTranslations() {
|
|
172
|
+
this.shareLabel = Salla.lang.get('pages.wishlist.share');
|
|
173
|
+
this.shareAllLabel = Salla.lang.get('pages.wishlist.share_all');
|
|
174
|
+
this.shareSpecificLabel = Salla.lang.get('pages.wishlist.share_specific');
|
|
175
|
+
this.selectAllLabel = Salla.lang.get('pages.wishlist.select_all');
|
|
176
|
+
this.cancelLabel = Salla.lang.get('common.elements.cancel');
|
|
177
|
+
this.shareModalTitle = Salla.lang.get('pages.wishlist.share_list_title');
|
|
178
|
+
}
|
|
179
|
+
get selectedCount() {
|
|
180
|
+
return this.selectedIds.length;
|
|
181
|
+
}
|
|
182
|
+
get isAllSelected() {
|
|
183
|
+
return this.loadedProductCount > 0 && this.selectedCount === this.loadedProductCount;
|
|
184
|
+
}
|
|
185
|
+
get isPartiallySelected() {
|
|
186
|
+
return this.selectedCount > 0 && this.selectedCount < this.loadedProductCount;
|
|
187
|
+
}
|
|
188
|
+
async syncLoadedProductCount() {
|
|
189
|
+
if (!this.productsList) {
|
|
190
|
+
this.loadedProductCount = 0;
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
if (this.isListSyncPaused && this.specificMode) {
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
const products = await this.productsList.getLoadedProducts();
|
|
197
|
+
this.loadedProductCount = products.length;
|
|
198
|
+
}
|
|
199
|
+
syncSelectAllCheckboxState() {
|
|
200
|
+
if (!this.selectAllCheckbox) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
this.selectAllCheckbox.checked = this.isAllSelected;
|
|
204
|
+
this.selectAllCheckbox.indeterminate = this.isPartiallySelected;
|
|
205
|
+
}
|
|
206
|
+
componentDidRender() {
|
|
207
|
+
this.syncSelectAllCheckboxState();
|
|
208
|
+
}
|
|
209
|
+
pauseListSync() {
|
|
210
|
+
this.isListSyncPaused = true;
|
|
211
|
+
window.setTimeout(() => {
|
|
212
|
+
if (this.isListSyncPaused) {
|
|
213
|
+
this.isListSyncPaused = false;
|
|
214
|
+
void this.syncHasProducts();
|
|
215
|
+
}
|
|
216
|
+
}, 3000);
|
|
217
|
+
}
|
|
218
|
+
async syncHasProducts(hasProductsHint) {
|
|
219
|
+
if (this.isListSyncPaused && typeof hasProductsHint !== 'boolean') {
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
if (typeof hasProductsHint === 'boolean') {
|
|
223
|
+
this.hasProducts = hasProductsHint;
|
|
224
|
+
}
|
|
225
|
+
else if (this.productsList) {
|
|
226
|
+
const products = await this.productsList.getLoadedProducts();
|
|
227
|
+
if (products.length === 0 && this.specificMode) {
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
this.hasProducts = products.length > 0;
|
|
231
|
+
this.loadedProductCount = products.length;
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
this.hasProducts = false;
|
|
235
|
+
this.loadedProductCount = 0;
|
|
236
|
+
}
|
|
237
|
+
if (!this.hasProducts) {
|
|
238
|
+
this.menuOpen = false;
|
|
239
|
+
if (this.specificMode) {
|
|
240
|
+
await this.cancelSpecific();
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
toggleMenu() {
|
|
245
|
+
if (!this.hasProducts) {
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
this.menuOpen = !this.menuOpen;
|
|
249
|
+
}
|
|
250
|
+
async toggleSelectAll() {
|
|
251
|
+
if (!this.productsList) {
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
if (this.isAllSelected) {
|
|
255
|
+
await this.productsList.clearSelection();
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
await this.productsList.selectAll();
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Enter "share specific items" mode: enable selection on the products list.
|
|
262
|
+
*/
|
|
263
|
+
async shareSpecific() {
|
|
264
|
+
this.menuOpen = false;
|
|
265
|
+
this.specificMode = true;
|
|
266
|
+
this.pauseListSync();
|
|
267
|
+
if (this.productsList) {
|
|
268
|
+
this.productsList.selectable = true;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Exit "share specific items" mode: disable selection and clear it.
|
|
273
|
+
*/
|
|
274
|
+
async cancelSpecific() {
|
|
275
|
+
this.specificMode = false;
|
|
276
|
+
this.selectedIds = [];
|
|
277
|
+
this.pauseListSync();
|
|
278
|
+
if (this.productsList) {
|
|
279
|
+
await this.productsList.clearSelection();
|
|
280
|
+
this.productsList.selectable = false;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Share all wishlist products.
|
|
285
|
+
*/
|
|
286
|
+
async shareAll() {
|
|
287
|
+
this.menuOpen = false;
|
|
288
|
+
await this.processShare([], true);
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Share the currently selected wishlist products.
|
|
292
|
+
*/
|
|
293
|
+
async shareSelected() {
|
|
294
|
+
if (!this.selectedCount) {
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
await this.processShare(this.selectedIds, false);
|
|
298
|
+
}
|
|
299
|
+
async processShare(ids, selectAll = false) {
|
|
300
|
+
if ((!selectAll && !ids?.length) || this.isSharing) {
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
this.isSharing = true;
|
|
304
|
+
try {
|
|
305
|
+
const response = await salla.wishlist.share(ids, selectAll);
|
|
306
|
+
const nextShareUrl = response?.data?.url || response?.url || '';
|
|
307
|
+
if (!nextShareUrl || !this.socialShare) {
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
this.shareUrl = nextShareUrl;
|
|
311
|
+
this.socialShare.url = nextShareUrl;
|
|
312
|
+
await this.socialShare.refresh();
|
|
313
|
+
await this.socialShare.open();
|
|
314
|
+
}
|
|
315
|
+
catch (error) {
|
|
316
|
+
Salla.logger?.warn?.('[salla-wishlist-actions] share failed', error);
|
|
317
|
+
}
|
|
318
|
+
finally {
|
|
319
|
+
this.isSharing = false;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
render() {
|
|
323
|
+
return (h(Host, { key: 'b81e89ba2b50777838fb24668a85b755febd9d18' }, h("div", { key: 'f412c4aae0044968b113c145bd116afce1a16e02', class: "s-wishlist-actions" }, h("div", { key: '4da9f5ba7b01b6c6abd2870c7cfb36ab2b3ed096', class: "s-wishlist-actions-bar flex items-center justify-end gap-3 mb-3" }, h("div", { key: '6411eaa75b26c327158eec88e77c04127a005bb6', class: "s-wishlist-actions-dropdown relative" }, h("salla-button", { key: '7bd0b43064b1cc48684151997b32c5e2585a1ae2', color: "primary", fill: "outline", type: "button", disabled: !this.hasProducts, "aria-haspopup": "true", "aria-expanded": this.menuOpen ? 'true' : 'false', onClick: () => this.toggleMenu() }, h("div", { key: '32131529c458e64d5dba13abae5271bce834d8e1', class: "flex flex-row justify-center items-center gap-2" }, h("svg", { key: 'd8a684cee58b071b347be32bf549c0396353085c', version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 32 32", style: { width: '16px', height: '16px' } }, h("path", { key: 'fdc7f657dd009b4b3233ef1bcd0403e07837d4c6', 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" })), this.shareLabel, h("svg", { key: '600757f2c20634e1081ffba89b2bf8e77cb1faf2', version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 32 32", style: { width: '16px', height: '16px' } }, h("path", { key: '1a42e36d54129c5ac781ac73960d011f3fc4861b', d: "M26.212 10.996c-0.556-0.484-1.396-0.428-1.881 0.127l-8.331 9.519-8.331-9.52c-0.485-0.555-1.327-0.611-1.881-0.125s-0.609 1.328-0.124 1.881l9.333 10.667c0.253 0.291 0.617 0.456 1.003 0.456s0.749-0.165 1.003-0.456l9.333-10.667c0.485-0.553 0.429-1.396-0.124-1.881z" })))), this.menuOpen && (h("ul", { key: '9c105a9d91a5ff7e5804d02eadca02fef1a98b4c', class: "s-wishlist-actions-menu absolute z-20 mt-1 bg-white rounded-lg shadow overflow-hidden" }, h("li", { key: '18ea949dd666a37206e0998cd41438500b2bdafc' }, h("button", { key: 'fec3f1544ee9efcd7fb228e895830469880abc89', type: "button", class: "s-wishlist-actions-menu-item", onClick: () => this.shareAll() }, this.shareAllLabel)), h("li", { key: '92b907a2dc5fab606b8a484f24d0655ef648e9f9' }, h("button", { key: '53f84c381937c0fa57f64a1b6e290b4b5ed6d281', type: "button", class: "s-wishlist-actions-menu-item", onClick: () => this.shareSpecific() }, this.shareSpecificLabel))))), h("salla-social-share", { key: '696c7448d6593a85811c8a3a7c18068728871d47', class: "s-wishlist-actions-social", ref: el => (this.socialShare = el), url: this.shareUrl, mode: "modal", modalTitle: this.shareModalTitle }, h("span", { key: 'f3e51bcb70b2bf529712ee7fa4a167e5a59ad64c', slot: "widget", class: "s-wishlist-actions-social-anchor", "aria-hidden": "true" }))), this.specificMode && (h("div", { key: '1895c4ccc6bf6ff6ad1d754c70b03016d52d4bbe', class: "s-wishlist-actions-panel flex items-center justify-between gap-4 flex-wrap p-4 mt-3 mb-3 bg-white rounded-lg" }, h("label", { key: '6c988b12e481febb3fe2ee6ddbb7e93424de641e', class: "s-wishlist-actions-panel-select-all flex items-center gap-2 cursor-pointer" }, h("input", { key: 'e33a34358e5b974065f8299a9b48ac3dd7b2cc40', type: "checkbox", class: "s-products-list-select-checkbox s-wishlist-actions-select-all", checked: this.isAllSelected, ref: el => (this.selectAllCheckbox = el), "aria-label": this.selectAllLabel, onChange: () => this.toggleSelectAll() }), h("span", { key: '8a2ae1c1010059a5138eeb8dd1ff15c2e618a617', class: "s-wishlist-actions-panel-title text-sm font-bold text-gray-700" }, this.shareSpecificLabel, " (", this.selectedCount, ")")), h("div", { key: '692bd55edf4909c88479f704f4590ba8f400ccb6', class: "s-wishlist-actions-panel-buttons flex items-center gap-2" }, h("salla-button", { key: 'c6b33fc8f1acb8dc46d7ba4ba3696b25f60ca433', class: "s-wishlist-actions-cancel", color: "light", fill: "outline", type: "button", onClick: () => this.cancelSpecific() }, this.cancelLabel), h("salla-button", { key: 'eec053d0c882b0958f498a0c4f0373102ec40a8e', class: "s-wishlist-actions-share", color: "primary", fill: "outline", type: "button", disabled: !this.selectedCount, loading: this.isSharing, onClick: () => this.shareSelected() }, this.shareLabel)))))));
|
|
324
|
+
}
|
|
325
|
+
get host() { return this; }
|
|
326
|
+
static get style() { return sallaWishlistActionsCss; }
|
|
327
|
+
}, [0, "salla-wishlist-actions", {
|
|
328
|
+
"menuOpen": [32],
|
|
329
|
+
"hasProducts": [32],
|
|
330
|
+
"specificMode": [32],
|
|
331
|
+
"selectedIds": [32],
|
|
332
|
+
"loadedProductCount": [32],
|
|
333
|
+
"isSharing": [32],
|
|
334
|
+
"shareUrl": [32],
|
|
335
|
+
"shareLabel": [32],
|
|
336
|
+
"shareAllLabel": [32],
|
|
337
|
+
"shareSpecificLabel": [32],
|
|
338
|
+
"selectAllLabel": [32],
|
|
339
|
+
"cancelLabel": [32],
|
|
340
|
+
"shareModalTitle": [32],
|
|
341
|
+
"shareSpecific": [64],
|
|
342
|
+
"cancelSpecific": [64],
|
|
343
|
+
"shareAll": [64],
|
|
344
|
+
"shareSelected": [64]
|
|
345
|
+
}]);
|
|
346
|
+
SallaWishlistActions$1.pageTitleClass = 's-wishlist-actions-page-title';
|
|
347
|
+
function defineCustomElement$1() {
|
|
348
|
+
if (typeof customElements === "undefined") {
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
const components = ["salla-wishlist-actions", "salla-button", "salla-social-share"];
|
|
352
|
+
components.forEach(tagName => { switch (tagName) {
|
|
353
|
+
case "salla-wishlist-actions":
|
|
354
|
+
if (!customElements.get(tagName)) {
|
|
355
|
+
customElements.define(tagName, SallaWishlistActions$1);
|
|
356
|
+
}
|
|
357
|
+
break;
|
|
358
|
+
case "salla-button":
|
|
359
|
+
if (!customElements.get(tagName)) {
|
|
360
|
+
defineCustomElement$3();
|
|
361
|
+
}
|
|
362
|
+
break;
|
|
363
|
+
case "salla-social-share":
|
|
364
|
+
if (!customElements.get(tagName)) {
|
|
365
|
+
defineCustomElement$2();
|
|
366
|
+
}
|
|
367
|
+
break;
|
|
368
|
+
} });
|
|
369
|
+
}
|
|
370
|
+
defineCustomElement$1();
|
|
371
|
+
|
|
372
|
+
const SallaWishlistActions = SallaWishlistActions$1;
|
|
373
|
+
const defineCustomElement = defineCustomElement$1;
|
|
374
|
+
|
|
375
|
+
export { SallaWishlistActions, defineCustomElement };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { h } from './index-
|
|
4
|
+
import { h } from './index-Cqh-ta1v.js';
|
|
5
5
|
|
|
6
6
|
function nearestLowerMultiple(number, multipleOf = window.matchMedia('(min-width: 768px)').matches ? 3 : 2) {
|
|
7
7
|
return number < multipleOf ? number : number - (number % multipleOf);
|