@salla.sa/twilight-components 2.14.466 → 2.14.468
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{filepond-ChLzVjJY.js → filepond-C1SAyrFq.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-CsFmGjnc.js → filepond-plugin-file-poster-DAhQ7rGa.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-CHsUG4Ey.js → filepond-plugin-file-validate-size-qfwxpApK.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-BcOZG5x6.js → filepond-plugin-file-validate-type-BbYanfPf.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-Cq0bUS7X.js → filepond-plugin-image-edit-lWdFhMNt.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-D6e7ezt-.js → filepond-plugin-image-exif-orientation-C2wUYBSb.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-B0fvWDqM.js → filepond-plugin-image-preview-B1ukjrjT.js} +1 -1
- package/dist/cjs/{functions-DQkYfvtq.js → functions-DCSgyun2.js} +1 -1
- package/dist/cjs/{index-DTSWXcbN.js → index-CXr_39D8.js} +9 -5
- package/dist/cjs/{index-MaPhQdOr.js → index-D3oJJZKW.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{mail-Bgvt2hc9.js → mail-C9D8MHae.js} +2 -2
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +29 -84
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-booking-field_7.cjs.entry.js +11 -11
- package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +91 -7
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +3 -3
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +63 -28
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +32 -2
- package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +4 -4
- package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-map.cjs.entry.js +1 -1
- package/dist/cjs/salla-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-list.cjs.entry.js +259 -64
- package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +3 -3
- package/dist/cjs/salla-rating-modal.cjs.entry.js +3 -3
- package/dist/cjs/salla-reward-action_4.cjs.entry.js +3 -3
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/salla-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +252 -32
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +4 -4
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.cjs.entry.js +2 -2
- package/dist/cjs/salla-verify.cjs.entry.js +3 -3
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +329 -0
- package/dist/cjs/{tracked-promise-ePwPYqjc.js → tracked-promise-BsYRgTGD.js} +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-l24zONcP.js → vanilla-picker-DkdzTjSC.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +90 -6
- package/dist/collection/components/salla-gifting/salla-gifting.js +69 -29
- package/dist/collection/components/salla-login-modal/salla-login-modal.js +31 -1
- package/dist/collection/components/salla-product-options/salla-product-options.css +0 -3
- package/dist/collection/components/salla-product-options/salla-product-options.js +28 -84
- package/dist/collection/components/salla-products-list/salla-products-list.css +76 -0
- package/dist/collection/components/salla-products-list/salla-products-list.js +387 -65
- package/dist/collection/components/salla-social-share/salla-social-share.css +161 -0
- package/dist/collection/components/salla-social-share/salla-social-share.js +316 -50
- package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
- package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
- package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
- package/dist/collection/components/salla-wishlist-actions/salla-wishlist-actions.css +65 -0
- package/dist/collection/components/salla-wishlist-actions/salla-wishlist-actions.js +432 -0
- package/dist/components/index.js +5 -5
- package/dist/components/salla-bullet-delivery.js +90 -6
- package/dist/components/salla-gifting.js +63 -27
- package/dist/components/salla-login-modal2.js +31 -1
- package/dist/components/salla-product-options2.js +28 -84
- package/dist/components/salla-products-list2.js +266 -64
- package/dist/components/salla-social-share.js +1 -189
- package/dist/components/salla-social-share2.js +420 -0
- package/dist/components/salla-tab-content2.js +1 -1
- package/dist/components/salla-tab-header2.js +1 -1
- package/dist/components/salla-tabs2.js +1 -1
- package/dist/components/salla-tel-input2.js +1 -1
- package/dist/components/salla-tooltip2.js +1 -1
- package/dist/components/salla-user-settings.js +1 -1
- package/dist/components/salla-wishlist-actions.d.ts +11 -0
- package/dist/components/salla-wishlist-actions.js +375 -0
- package/dist/esm/{filepond-C8Bwo-02.js → filepond-C4pZr9nR.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-Bx3Pf2Jt.js → filepond-plugin-file-poster-CXpAGxT4.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-B855u7Nl.js → filepond-plugin-file-validate-size-Dk4M6ge1.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-Bi5ftj6I.js → filepond-plugin-file-validate-type-DD7qvRsg.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-BDsvflVi.js → filepond-plugin-image-edit-DMllAEkg.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-CIBvl9lW.js → filepond-plugin-image-exif-orientation-BRCbcu_E.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-iKOdvH4g.js → filepond-plugin-image-preview-DgeylrwN.js} +1 -1
- package/dist/esm/{functions-Bc7BItqP.js → functions-DrS7by6t.js} +1 -1
- package/dist/esm/{index-TDIoPT-F.js → index-9SnsJoYO.js} +1 -1
- package/dist/esm/{index-B4SEH_Fg.js → index-D2yBy7Jh.js} +9 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{mail-DLNIOD9t.js → mail-DzAIgzdz.js} +2 -2
- package/dist/esm/salla-accordion-body_2.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +1 -1
- package/dist/esm/salla-add-product-button_5.entry.js +29 -84
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +1 -1
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-booking-field_7.entry.js +11 -11
- package/dist/esm/salla-bullet-delivery_2.entry.js +91 -7
- package/dist/esm/salla-cart-coupons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
- package/dist/esm/salla-cashback-banner.entry.js +1 -1
- package/dist/esm/salla-comment-form_8.entry.js +1 -1
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +3 -3
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- package/dist/esm/salla-edit-order-button.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +63 -28
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +32 -2
- package/dist/esm/salla-loyalty-banner.entry.js +2 -2
- package/dist/esm/salla-loyalty-hero_2.entry.js +4 -4
- package/dist/esm/salla-loyalty-panel.entry.js +3 -3
- package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-program.entry.js +3 -3
- package/dist/esm/salla-loyalty-reward.entry.js +2 -2
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-map.entry.js +1 -1
- package/dist/esm/salla-menu.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-next-order-coupon.entry.js +1 -1
- package/dist/esm/salla-notification-item.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer-modal.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-branch.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-placeholder.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-product-card-embed.entry.js +1 -1
- package/dist/esm/salla-product-card_2.entry.js +1 -1
- package/dist/esm/salla-product-size-guide.entry.js +1 -1
- package/dist/esm/salla-products-list.entry.js +259 -64
- package/dist/esm/salla-progress-bar.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +3 -3
- package/dist/esm/salla-rating-modal.entry.js +3 -3
- package/dist/esm/salla-reward-action_4.entry.js +3 -3
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +1 -1
- package/dist/esm/salla-slider.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +252 -32
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tab-content_3.entry.js +4 -4
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +2 -2
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +1 -1
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.entry.js +2 -2
- package/dist/esm/salla-verify.entry.js +3 -3
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/salla-wishlist-actions.entry.js +327 -0
- package/dist/esm/{tracked-promise-DJMfgq3q.js → tracked-promise-CTcAqNfZ.js} +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-BZ3Kpnm6.js → vanilla-picker-DfeK45Yv.js} +1 -1
- package/dist/twilight/{p-7a144cce.entry.js → p-07af3286.entry.js} +1 -1
- package/dist/twilight/{p-08fa3250.entry.js → p-08337b2b.entry.js} +1 -1
- package/dist/twilight/{p-c4a2f0c4.entry.js → p-08771dff.entry.js} +1 -1
- package/dist/twilight/{p-63b6ff19.entry.js → p-0e1bab4f.entry.js} +1 -1
- package/dist/twilight/{p-a94c8805.entry.js → p-0eadca17.entry.js} +1 -1
- package/dist/twilight/{p-92ecbfb3.entry.js → p-12ccc1ab.entry.js} +1 -1
- package/dist/twilight/{p-d1be0cf0.entry.js → p-1574176e.entry.js} +1 -1
- package/dist/twilight/{p-b1c9125f.entry.js → p-17015f9c.entry.js} +1 -1
- package/dist/twilight/{p-f4326883.entry.js → p-1920b702.entry.js} +1 -1
- package/dist/twilight/{p-65cc4abf.entry.js → p-1a1cebfa.entry.js} +1 -1
- package/dist/twilight/{p-b22966df.entry.js → p-1a844fda.entry.js} +1 -1
- package/dist/twilight/{p-1beccaa5.entry.js → p-1b7ebf47.entry.js} +1 -1
- package/dist/twilight/{p-999abe04.entry.js → p-223d7ceb.entry.js} +1 -1
- package/dist/twilight/{p-b99ecd2c.entry.js → p-255f5d2a.entry.js} +1 -1
- package/dist/twilight/{p-077c5ae5.entry.js → p-266f57de.entry.js} +1 -1
- package/dist/twilight/p-28bdf8ec.entry.js +4 -0
- package/dist/twilight/{p-089507be.entry.js → p-2c7086ec.entry.js} +1 -1
- package/dist/twilight/{p-fe6a634f.entry.js → p-2c7f524a.entry.js} +1 -1
- package/dist/twilight/{p-ac91aa4f.entry.js → p-30ea9a82.entry.js} +1 -1
- package/dist/twilight/{p-0beaf6f8.entry.js → p-313d38cd.entry.js} +1 -1
- package/dist/twilight/{p-70658c1a.entry.js → p-315ce27b.entry.js} +1 -1
- package/dist/twilight/p-378d45e2.entry.js +4 -0
- package/dist/twilight/{p-96489529.entry.js → p-3c2fe8cd.entry.js} +1 -1
- package/dist/twilight/{p-3b416cdd.entry.js → p-3d1e7982.entry.js} +1 -1
- package/dist/twilight/{p-7e0bfa67.entry.js → p-3d7c0ac6.entry.js} +1 -1
- package/dist/twilight/{p-3e9fb046.entry.js → p-3d8d289e.entry.js} +1 -1
- package/dist/twilight/{p-c5b5162c.entry.js → p-4144c908.entry.js} +1 -1
- package/dist/twilight/{p-f4a5521e.entry.js → p-453a7bb2.entry.js} +1 -1
- package/dist/twilight/{p-7a238d37.entry.js → p-4c457ba5.entry.js} +1 -1
- package/dist/twilight/{p-d33fe4fe.entry.js → p-4d3bcacd.entry.js} +1 -1
- package/dist/twilight/{p-53c1a65f.entry.js → p-4dedb514.entry.js} +1 -1
- package/dist/twilight/{p-eebe55bd.entry.js → p-50dfec0a.entry.js} +1 -1
- package/dist/twilight/{p-72627a5b.entry.js → p-53f83426.entry.js} +1 -1
- package/dist/twilight/{p-20bed966.entry.js → p-54e9ac89.entry.js} +1 -1
- package/dist/twilight/{p-20b24e22.entry.js → p-571b8e00.entry.js} +1 -1
- package/dist/twilight/{p-7e0f8832.entry.js → p-5a5057a8.entry.js} +1 -1
- package/dist/twilight/{p-5817d5db.entry.js → p-5a9b94f8.entry.js} +1 -1
- package/dist/twilight/{p-ac2979bf.entry.js → p-5c1c520a.entry.js} +1 -1
- package/dist/twilight/{p-649cca57.entry.js → p-5d06fe77.entry.js} +1 -1
- package/dist/twilight/{p-eb7e08dd.entry.js → p-5e433652.entry.js} +1 -1
- package/dist/twilight/{p-c605f897.entry.js → p-6046666d.entry.js} +1 -1
- package/dist/twilight/{p-ace778dd.entry.js → p-67e23040.entry.js} +1 -1
- package/dist/twilight/{p-0c721c37.entry.js → p-6c777951.entry.js} +1 -1
- package/dist/twilight/{p-aaf77847.entry.js → p-749dbf27.entry.js} +1 -1
- package/dist/twilight/p-7bd464f3.entry.js +4 -0
- package/dist/twilight/{p-88a26183.entry.js → p-7ffc1711.entry.js} +1 -1
- package/dist/twilight/{p-173638ad.entry.js → p-83b6c374.entry.js} +1 -1
- package/dist/twilight/{p-83f3fe92.entry.js → p-8b5d26d3.entry.js} +1 -1
- package/dist/twilight/{p-46efd843.entry.js → p-9a0514dd.entry.js} +1 -1
- package/dist/twilight/{p-a8a43d8f.entry.js → p-9ba953ab.entry.js} +1 -1
- package/dist/twilight/{p-BhwNzoAX.js → p-BGpAIcg-.js} +1 -1
- package/dist/twilight/{p-DqcHIrMk.js → p-BHkz1ssL.js} +1 -1
- package/dist/twilight/{p-DCiLQw-U.js → p-BZhp8a87.js} +1 -1
- package/dist/twilight/{p-1GhsZ-y0.js → p-Bo1nXenO.js} +1 -1
- package/dist/twilight/{p-B8tpOftS.js → p-BojnM4VS.js} +1 -1
- package/dist/twilight/{p-CzKuXgcx.js → p-CBU9I-zy.js} +1 -1
- package/dist/twilight/{p-BPrbqbi4.js → p-CGd7EQZr.js} +1 -1
- package/dist/twilight/p-D01LipFK.js +9 -0
- package/dist/twilight/{p-B4SEH_Fg.js → p-D2yBy7Jh.js} +2 -2
- package/dist/twilight/{p-Bol9M57m.js → p-DSgSJMud.js} +2 -2
- package/dist/twilight/{p-DLNIOD9t.js → p-DzAIgzdz.js} +1 -1
- package/dist/twilight/{p-26ff2da1.entry.js → p-a0d88c4d.entry.js} +1 -1
- package/dist/twilight/{p-7f8b4a78.entry.js → p-a2b53a52.entry.js} +1 -1
- package/dist/twilight/{p-c360bc76.entry.js → p-a3e1fafc.entry.js} +1 -1
- package/dist/twilight/{p-204b9c34.entry.js → p-a463d567.entry.js} +1 -1
- package/dist/twilight/{p-39e531f4.entry.js → p-a6a9e398.entry.js} +1 -1
- package/dist/twilight/{p-5a8e7bb9.entry.js → p-a79f60e6.entry.js} +1 -1
- package/dist/twilight/{p-36528e88.entry.js → p-aadfd70e.entry.js} +1 -1
- package/dist/twilight/{p-7dc4a6ce.entry.js → p-ad0a27e2.entry.js} +1 -1
- package/dist/twilight/{p-2a1c12f9.entry.js → p-ae8bd2e7.entry.js} +1 -1
- package/dist/twilight/{p-50b92803.entry.js → p-af121bbf.entry.js} +1 -1
- package/dist/twilight/p-b0f28806.entry.js +4 -0
- package/dist/twilight/{p-7c46d055.entry.js → p-b3f6b725.entry.js} +1 -1
- package/dist/twilight/{p-e0e8b5ee.entry.js → p-b7e720e8.entry.js} +1 -1
- package/dist/twilight/{p-19748525.entry.js → p-b80016c8.entry.js} +1 -1
- package/dist/twilight/{p-19afb593.entry.js → p-c0f40eea.entry.js} +1 -1
- package/dist/twilight/p-c4bc10c1.entry.js +4 -0
- package/dist/twilight/{p-6bf44c4f.entry.js → p-c637b6bb.entry.js} +1 -1
- package/dist/twilight/{p-afb4ffe9.entry.js → p-c6e18746.entry.js} +1 -1
- package/dist/twilight/{p-a0433089.entry.js → p-cb855cb3.entry.js} +1 -1
- package/dist/twilight/{p-88c110ae.entry.js → p-cbc44b3e.entry.js} +1 -1
- package/dist/twilight/{p-d98c3e96.entry.js → p-cbf547f0.entry.js} +1 -1
- package/dist/twilight/{p-78cc1984.entry.js → p-cebad615.entry.js} +1 -1
- package/dist/twilight/{p-0abda719.entry.js → p-cfd910a8.entry.js} +1 -1
- package/dist/twilight/{p-a366dff0.entry.js → p-d0a8b9be.entry.js} +1 -1
- package/dist/twilight/{p-921b23fc.entry.js → p-d0cae7da.entry.js} +1 -1
- package/dist/twilight/{p-47df8f81.entry.js → p-d861eea6.entry.js} +1 -1
- package/dist/twilight/p-daa9c0b3.entry.js +4 -0
- package/dist/twilight/{p-7310af57.entry.js → p-db43fa93.entry.js} +1 -1
- package/dist/twilight/{p-83beb2f7.entry.js → p-e06a7e19.entry.js} +1 -1
- package/dist/twilight/{p-6fb05a50.entry.js → p-e34f68e0.entry.js} +1 -1
- package/dist/twilight/{p-5647ab30.entry.js → p-e4cac2a9.entry.js} +1 -1
- package/dist/twilight/{p-9f817867.entry.js → p-e5de1833.entry.js} +1 -1
- package/dist/twilight/{p-61bbcb2e.entry.js → p-e80ee5b0.entry.js} +2 -2
- package/dist/twilight/{p-42523f08.entry.js → p-e8ffc069.entry.js} +1 -1
- package/dist/twilight/{p-1027f1df.entry.js → p-ee8c7a5a.entry.js} +1 -1
- package/dist/twilight/{p-6667d7e9.entry.js → p-f0dedf42.entry.js} +1 -1
- package/dist/twilight/{p-fc2c74e3.entry.js → p-f3a01895.entry.js} +1 -1
- package/dist/twilight/{p-e0bafef7.entry.js → p-fb56a444.entry.js} +1 -1
- package/dist/twilight/{p-02dac67d.entry.js → p-fe1bced4.entry.js} +1 -1
- package/dist/twilight/{p-Cip0ZIcP.js → p-paiaALkJ.js} +1 -1
- package/dist/twilight/{p-BNurXH-d.js → p-xz8gqXL9.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-bullet-delivery/salla-bullet-delivery.d.ts +16 -0
- package/dist/types/components/salla-gifting/gift-schema.d.ts +4 -0
- package/dist/types/components/salla-gifting/salla-gifting.d.ts +4 -1
- package/dist/types/components/salla-login-modal/salla-login-modal.d.ts +2 -0
- package/dist/types/components/salla-product-options/salla-product-options.d.ts +0 -11
- package/dist/types/components/salla-products-list/salla-products-list.d.ts +60 -6
- package/dist/types/components/salla-social-share/salla-social-share.d.ts +39 -2
- package/dist/types/components/salla-wishlist-actions/salla-wishlist-actions.d.ts +93 -0
- package/dist/types/components.d.ts +172 -18
- package/package.json +5 -5
- package/dist/twilight/p-6020ddec.entry.js +0 -4
- package/dist/twilight/p-645254eb.entry.js +0 -4
- package/dist/twilight/p-99a57ad1.entry.js +0 -4
- package/dist/twilight/p-BnjD0Cne.js +0 -9
- package/dist/twilight/p-b3456579.entry.js +0 -4
- package/dist/twilight/p-d19c0be3.entry.js +0 -4
|
@@ -123,7 +123,7 @@ export class SallaTelInput {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
render() {
|
|
126
|
-
return (h(Host, { key: '
|
|
126
|
+
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" })));
|
|
127
127
|
}
|
|
128
128
|
componentDidLoad() {
|
|
129
129
|
this.initTelInput();
|
|
@@ -27,7 +27,7 @@ export class SallaTooltip {
|
|
|
27
27
|
}
|
|
28
28
|
render() {
|
|
29
29
|
const validTheme = ['default', 'dark'].includes(this.theme) ? this.theme : 'default';
|
|
30
|
-
return (h("div", { key: '
|
|
30
|
+
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))));
|
|
31
31
|
}
|
|
32
32
|
static get is() { return "salla-tooltip"; }
|
|
33
33
|
static get originalStyleUrls() {
|
|
@@ -56,7 +56,7 @@ export class SallaUserSettings {
|
|
|
56
56
|
await salla.profile.delete().finally(() => this.confirmationModal.close());
|
|
57
57
|
}
|
|
58
58
|
render() {
|
|
59
|
-
return (h(Host, { key: '
|
|
59
|
+
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)))))));
|
|
60
60
|
}
|
|
61
61
|
static get is() { return "salla-user-settings"; }
|
|
62
62
|
static get originalStyleUrls() {
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.s-wishlist-actions-menu {
|
|
6
|
+
min-width: 200px;
|
|
7
|
+
inset-inline-end: 0;
|
|
8
|
+
inset-inline-start: auto;
|
|
9
|
+
list-style: none;
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 4px 0;
|
|
12
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.s-wishlist-actions-menu-item {
|
|
16
|
+
display: block;
|
|
17
|
+
width: 100%;
|
|
18
|
+
padding: 10px 16px;
|
|
19
|
+
text-align: start;
|
|
20
|
+
font-size: 0.875rem;
|
|
21
|
+
color: #374151;
|
|
22
|
+
background: transparent;
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.s-wishlist-actions-menu-item:hover {
|
|
28
|
+
background-color: #f3f4f6;
|
|
29
|
+
color: var(--color-primary);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.s-wishlist-actions-panel {
|
|
33
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.s-wishlist-actions-panel-select-all {
|
|
37
|
+
user-select: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.s-wishlist-actions-select-all:indeterminate,
|
|
41
|
+
.s-wishlist-actions-select-all:indeterminate:hover,
|
|
42
|
+
.s-wishlist-actions-select-all:indeterminate:focus {
|
|
43
|
+
background-color: var(--color-primary);
|
|
44
|
+
border-color: var(--color-primary);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.s-wishlist-actions-select-all:indeterminate::after {
|
|
48
|
+
content: "";
|
|
49
|
+
position: absolute;
|
|
50
|
+
top: 50%;
|
|
51
|
+
left: 50%;
|
|
52
|
+
width: 10px;
|
|
53
|
+
height: 2px;
|
|
54
|
+
background: #fff;
|
|
55
|
+
border: none;
|
|
56
|
+
transform: translate(-50%, -50%);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.s-wishlist-actions-social-anchor {
|
|
60
|
+
display: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
h1.s-wishlist-actions-page-title {
|
|
64
|
+
text-align: start !important;
|
|
65
|
+
}
|
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import { h, Host } from "@stencil/core";
|
|
5
|
+
/**
|
|
6
|
+
* Actions header (panel) rendered on top of the wishlist `salla-products-list`.
|
|
7
|
+
*
|
|
8
|
+
* It exposes a "Share" dropdown with two options:
|
|
9
|
+
* - Share all items: shares the whole wishlist right away via `salla-social-share`.
|
|
10
|
+
* - Share specific items: enables multi-selection on the sibling
|
|
11
|
+
* `salla-products-list` and shows a panel to share the selected products.
|
|
12
|
+
*
|
|
13
|
+
* Selection is enabled on the products list at runtime, so no theme markup
|
|
14
|
+
* changes are required and it works for every theme exposing the
|
|
15
|
+
* `customer:wishlist.items.start` hook.
|
|
16
|
+
*/
|
|
17
|
+
export class SallaWishlistActions {
|
|
18
|
+
constructor() {
|
|
19
|
+
this.menuOpen = false;
|
|
20
|
+
this.hasProducts = false;
|
|
21
|
+
/** Whether the "share specific items" selection mode is active. */
|
|
22
|
+
this.specificMode = false;
|
|
23
|
+
this.selectedIds = [];
|
|
24
|
+
this.loadedProductCount = 0;
|
|
25
|
+
this.isSharing = false;
|
|
26
|
+
this.shareUrl = '';
|
|
27
|
+
/** Ignore transient empty DOM while the products list reloads after toggling selection. */
|
|
28
|
+
this.isListSyncPaused = false;
|
|
29
|
+
/**
|
|
30
|
+
* Bilingual defaults for the translation keys introduced by this feature.
|
|
31
|
+
* Registered via `Salla.lang.addBulk` only when missing, so store/central
|
|
32
|
+
* translations always take precedence.
|
|
33
|
+
*/
|
|
34
|
+
this.translationDefaults = {
|
|
35
|
+
'pages.wishlist.share': { ar: 'شارك', en: 'Share' },
|
|
36
|
+
'pages.wishlist.share_all': { ar: 'مشاركة القائمة', en: 'Share the list' },
|
|
37
|
+
'pages.wishlist.share_specific': { ar: 'مشاركة منتجات محددة', en: 'Share specific items' },
|
|
38
|
+
'pages.wishlist.share_list_title': { ar: 'مشاركة قائمة الأمنيات', en: 'Share wishlist' },
|
|
39
|
+
'pages.wishlist.select_all': { ar: 'تحديد الكل', en: 'Select all' },
|
|
40
|
+
'common.elements.cancel': { ar: 'إلغاء', en: 'Cancel' },
|
|
41
|
+
};
|
|
42
|
+
this.onSelectionChanged = (detail) => {
|
|
43
|
+
this.selectedIds = detail?.ids || [];
|
|
44
|
+
this.shareUrl = '';
|
|
45
|
+
void this.socialShare?.close();
|
|
46
|
+
void this.syncLoadedProductCount();
|
|
47
|
+
};
|
|
48
|
+
this.onDocumentClick = (event) => {
|
|
49
|
+
if (this.menuOpen && !this.host.contains(event.target)) {
|
|
50
|
+
this.menuOpen = false;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
this.onProductsFetched = (response) => {
|
|
54
|
+
if (response?.source !== 'wishlist') {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
this.isListSyncPaused = false;
|
|
58
|
+
void this.syncHasProducts(!!response?.data?.length);
|
|
59
|
+
void this.syncLoadedProductCount();
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
async componentWillLoad() {
|
|
63
|
+
await Salla.onReady();
|
|
64
|
+
await Salla.lang.onLoaded();
|
|
65
|
+
this.registerTranslationDefaults();
|
|
66
|
+
this.loadTranslations();
|
|
67
|
+
Salla.event.on('salla-products-list::selection.changed', this.onSelectionChanged);
|
|
68
|
+
Salla.event.on('salla-products-list::products.fetched', this.onProductsFetched);
|
|
69
|
+
document.addEventListener('click', this.onDocumentClick);
|
|
70
|
+
}
|
|
71
|
+
componentDidLoad() {
|
|
72
|
+
this.initPageTitleAlignment();
|
|
73
|
+
this.productsList = this.host.parentElement?.querySelector('salla-products-list');
|
|
74
|
+
if (!this.productsList) {
|
|
75
|
+
Salla.logger?.warn?.('[salla-wishlist-actions] no sibling salla-products-list found');
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
void this.syncHasProducts();
|
|
79
|
+
this.productsObserver = new MutationObserver(() => void this.syncHasProducts());
|
|
80
|
+
this.productsObserver.observe(this.productsList, { childList: true, subtree: true });
|
|
81
|
+
}
|
|
82
|
+
disconnectedCallback() {
|
|
83
|
+
Salla.event.off('salla-products-list::selection.changed', this.onSelectionChanged);
|
|
84
|
+
Salla.event.off('salla-products-list::products.fetched', this.onProductsFetched);
|
|
85
|
+
document.removeEventListener('click', this.onDocumentClick);
|
|
86
|
+
this.productsObserver?.disconnect();
|
|
87
|
+
this.pageTitleObserver?.disconnect();
|
|
88
|
+
if (this.pageTitleRetryTimeout) {
|
|
89
|
+
window.clearTimeout(this.pageTitleRetryTimeout);
|
|
90
|
+
}
|
|
91
|
+
this.resetPageTitleAlignment();
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* The wishlist page title (`h1`) lives in theme markup outside this component.
|
|
95
|
+
* Alignment is handled by `h1.s-wishlist-actions-page-title` in the component stylesheet.
|
|
96
|
+
*/
|
|
97
|
+
initPageTitleAlignment() {
|
|
98
|
+
this.syncPageTitleAlignment();
|
|
99
|
+
if (this.pageTitle) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
requestAnimationFrame(() => this.syncPageTitleAlignment());
|
|
103
|
+
this.pageTitleRetryTimeout = window.setTimeout(() => this.syncPageTitleAlignment(), 300);
|
|
104
|
+
const observeRoot = this.host.closest('.main-content') ?? this.host.parentElement;
|
|
105
|
+
if (!observeRoot || this.pageTitle) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
this.pageTitleObserver = new MutationObserver(() => {
|
|
109
|
+
if (this.pageTitle) {
|
|
110
|
+
this.pageTitleObserver?.disconnect();
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
this.syncPageTitleAlignment();
|
|
114
|
+
if (this.pageTitle) {
|
|
115
|
+
this.pageTitleObserver?.disconnect();
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
this.pageTitleObserver.observe(observeRoot, { childList: true, subtree: true });
|
|
119
|
+
}
|
|
120
|
+
findPageTitle() {
|
|
121
|
+
const parent = this.host.parentElement;
|
|
122
|
+
if (parent) {
|
|
123
|
+
for (const child of Array.from(parent.children)) {
|
|
124
|
+
if (child === this.host) {
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
if (child.tagName === 'H1') {
|
|
128
|
+
return child;
|
|
129
|
+
}
|
|
130
|
+
const nestedTitle = child.querySelector('h1');
|
|
131
|
+
if (nestedTitle) {
|
|
132
|
+
return nestedTitle;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
const mainContent = this.host.closest('.main-content');
|
|
137
|
+
if (mainContent) {
|
|
138
|
+
const titleInMain = mainContent.querySelector('h1');
|
|
139
|
+
if (titleInMain && !this.host.contains(titleInMain)) {
|
|
140
|
+
return titleInMain;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
return document.querySelector('.main-content h1, main h1');
|
|
144
|
+
}
|
|
145
|
+
syncPageTitleAlignment() {
|
|
146
|
+
if (this.pageTitle) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
const title = this.findPageTitle();
|
|
150
|
+
if (!title) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
this.pageTitle = title;
|
|
154
|
+
title.classList.add(SallaWishlistActions.pageTitleClass);
|
|
155
|
+
}
|
|
156
|
+
resetPageTitleAlignment() {
|
|
157
|
+
this.pageTitle?.classList.remove(SallaWishlistActions.pageTitleClass);
|
|
158
|
+
this.pageTitle = undefined;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Register bilingual (ar/en) defaults for our keys, without overriding any
|
|
162
|
+
* translation that already exists in the store/central translations.
|
|
163
|
+
*/
|
|
164
|
+
registerTranslationDefaults() {
|
|
165
|
+
const missing = Object.entries(this.translationDefaults).reduce((acc, [key, value]) => {
|
|
166
|
+
// `get` returns the key itself when no translation is found.
|
|
167
|
+
if (Salla.lang.get(key) === key) {
|
|
168
|
+
acc[key] = value;
|
|
169
|
+
}
|
|
170
|
+
return acc;
|
|
171
|
+
}, {});
|
|
172
|
+
if (Object.keys(missing).length) {
|
|
173
|
+
Salla.lang.addBulk(missing);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
loadTranslations() {
|
|
177
|
+
this.shareLabel = Salla.lang.get('pages.wishlist.share');
|
|
178
|
+
this.shareAllLabel = Salla.lang.get('pages.wishlist.share_all');
|
|
179
|
+
this.shareSpecificLabel = Salla.lang.get('pages.wishlist.share_specific');
|
|
180
|
+
this.selectAllLabel = Salla.lang.get('pages.wishlist.select_all');
|
|
181
|
+
this.cancelLabel = Salla.lang.get('common.elements.cancel');
|
|
182
|
+
this.shareModalTitle = Salla.lang.get('pages.wishlist.share_list_title');
|
|
183
|
+
}
|
|
184
|
+
get selectedCount() {
|
|
185
|
+
return this.selectedIds.length;
|
|
186
|
+
}
|
|
187
|
+
get isAllSelected() {
|
|
188
|
+
return this.loadedProductCount > 0 && this.selectedCount === this.loadedProductCount;
|
|
189
|
+
}
|
|
190
|
+
get isPartiallySelected() {
|
|
191
|
+
return this.selectedCount > 0 && this.selectedCount < this.loadedProductCount;
|
|
192
|
+
}
|
|
193
|
+
async syncLoadedProductCount() {
|
|
194
|
+
if (!this.productsList) {
|
|
195
|
+
this.loadedProductCount = 0;
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
if (this.isListSyncPaused && this.specificMode) {
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
const products = await this.productsList.getLoadedProducts();
|
|
202
|
+
this.loadedProductCount = products.length;
|
|
203
|
+
}
|
|
204
|
+
syncSelectAllCheckboxState() {
|
|
205
|
+
if (!this.selectAllCheckbox) {
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
this.selectAllCheckbox.checked = this.isAllSelected;
|
|
209
|
+
this.selectAllCheckbox.indeterminate = this.isPartiallySelected;
|
|
210
|
+
}
|
|
211
|
+
componentDidRender() {
|
|
212
|
+
this.syncSelectAllCheckboxState();
|
|
213
|
+
}
|
|
214
|
+
pauseListSync() {
|
|
215
|
+
this.isListSyncPaused = true;
|
|
216
|
+
window.setTimeout(() => {
|
|
217
|
+
if (this.isListSyncPaused) {
|
|
218
|
+
this.isListSyncPaused = false;
|
|
219
|
+
void this.syncHasProducts();
|
|
220
|
+
}
|
|
221
|
+
}, 3000);
|
|
222
|
+
}
|
|
223
|
+
async syncHasProducts(hasProductsHint) {
|
|
224
|
+
if (this.isListSyncPaused && typeof hasProductsHint !== 'boolean') {
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
if (typeof hasProductsHint === 'boolean') {
|
|
228
|
+
this.hasProducts = hasProductsHint;
|
|
229
|
+
}
|
|
230
|
+
else if (this.productsList) {
|
|
231
|
+
const products = await this.productsList.getLoadedProducts();
|
|
232
|
+
if (products.length === 0 && this.specificMode) {
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
this.hasProducts = products.length > 0;
|
|
236
|
+
this.loadedProductCount = products.length;
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
this.hasProducts = false;
|
|
240
|
+
this.loadedProductCount = 0;
|
|
241
|
+
}
|
|
242
|
+
if (!this.hasProducts) {
|
|
243
|
+
this.menuOpen = false;
|
|
244
|
+
if (this.specificMode) {
|
|
245
|
+
await this.cancelSpecific();
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
toggleMenu() {
|
|
250
|
+
if (!this.hasProducts) {
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
this.menuOpen = !this.menuOpen;
|
|
254
|
+
}
|
|
255
|
+
async toggleSelectAll() {
|
|
256
|
+
if (!this.productsList) {
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
if (this.isAllSelected) {
|
|
260
|
+
await this.productsList.clearSelection();
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
await this.productsList.selectAll();
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Enter "share specific items" mode: enable selection on the products list.
|
|
267
|
+
*/
|
|
268
|
+
async shareSpecific() {
|
|
269
|
+
this.menuOpen = false;
|
|
270
|
+
this.specificMode = true;
|
|
271
|
+
this.pauseListSync();
|
|
272
|
+
if (this.productsList) {
|
|
273
|
+
this.productsList.selectable = true;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Exit "share specific items" mode: disable selection and clear it.
|
|
278
|
+
*/
|
|
279
|
+
async cancelSpecific() {
|
|
280
|
+
this.specificMode = false;
|
|
281
|
+
this.selectedIds = [];
|
|
282
|
+
this.pauseListSync();
|
|
283
|
+
if (this.productsList) {
|
|
284
|
+
await this.productsList.clearSelection();
|
|
285
|
+
this.productsList.selectable = false;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Share all wishlist products.
|
|
290
|
+
*/
|
|
291
|
+
async shareAll() {
|
|
292
|
+
this.menuOpen = false;
|
|
293
|
+
await this.processShare([], true);
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Share the currently selected wishlist products.
|
|
297
|
+
*/
|
|
298
|
+
async shareSelected() {
|
|
299
|
+
if (!this.selectedCount) {
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
await this.processShare(this.selectedIds, false);
|
|
303
|
+
}
|
|
304
|
+
async processShare(ids, selectAll = false) {
|
|
305
|
+
if ((!selectAll && !ids?.length) || this.isSharing) {
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
this.isSharing = true;
|
|
309
|
+
try {
|
|
310
|
+
const response = await salla.wishlist.share(ids, selectAll);
|
|
311
|
+
const nextShareUrl = response?.data?.url || response?.url || '';
|
|
312
|
+
if (!nextShareUrl || !this.socialShare) {
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
this.shareUrl = nextShareUrl;
|
|
316
|
+
this.socialShare.url = nextShareUrl;
|
|
317
|
+
await this.socialShare.refresh();
|
|
318
|
+
await this.socialShare.open();
|
|
319
|
+
}
|
|
320
|
+
catch (error) {
|
|
321
|
+
Salla.logger?.warn?.('[salla-wishlist-actions] share failed', error);
|
|
322
|
+
}
|
|
323
|
+
finally {
|
|
324
|
+
this.isSharing = false;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
render() {
|
|
328
|
+
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)))))));
|
|
329
|
+
}
|
|
330
|
+
static get is() { return "salla-wishlist-actions"; }
|
|
331
|
+
static get originalStyleUrls() {
|
|
332
|
+
return {
|
|
333
|
+
"$": ["salla-wishlist-actions.scss"]
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
static get styleUrls() {
|
|
337
|
+
return {
|
|
338
|
+
"$": ["salla-wishlist-actions.css"]
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
static get states() {
|
|
342
|
+
return {
|
|
343
|
+
"menuOpen": {},
|
|
344
|
+
"hasProducts": {},
|
|
345
|
+
"specificMode": {},
|
|
346
|
+
"selectedIds": {},
|
|
347
|
+
"loadedProductCount": {},
|
|
348
|
+
"isSharing": {},
|
|
349
|
+
"shareUrl": {},
|
|
350
|
+
"shareLabel": {},
|
|
351
|
+
"shareAllLabel": {},
|
|
352
|
+
"shareSpecificLabel": {},
|
|
353
|
+
"selectAllLabel": {},
|
|
354
|
+
"cancelLabel": {},
|
|
355
|
+
"shareModalTitle": {}
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
static get methods() {
|
|
359
|
+
return {
|
|
360
|
+
"shareSpecific": {
|
|
361
|
+
"complexType": {
|
|
362
|
+
"signature": "() => Promise<void>",
|
|
363
|
+
"parameters": [],
|
|
364
|
+
"references": {
|
|
365
|
+
"Promise": {
|
|
366
|
+
"location": "global",
|
|
367
|
+
"id": "global::Promise"
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
"return": "Promise<void>"
|
|
371
|
+
},
|
|
372
|
+
"docs": {
|
|
373
|
+
"text": "Enter \"share specific items\" mode: enable selection on the products list.",
|
|
374
|
+
"tags": []
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
"cancelSpecific": {
|
|
378
|
+
"complexType": {
|
|
379
|
+
"signature": "() => Promise<void>",
|
|
380
|
+
"parameters": [],
|
|
381
|
+
"references": {
|
|
382
|
+
"Promise": {
|
|
383
|
+
"location": "global",
|
|
384
|
+
"id": "global::Promise"
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
"return": "Promise<void>"
|
|
388
|
+
},
|
|
389
|
+
"docs": {
|
|
390
|
+
"text": "Exit \"share specific items\" mode: disable selection and clear it.",
|
|
391
|
+
"tags": []
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
"shareAll": {
|
|
395
|
+
"complexType": {
|
|
396
|
+
"signature": "() => Promise<void>",
|
|
397
|
+
"parameters": [],
|
|
398
|
+
"references": {
|
|
399
|
+
"Promise": {
|
|
400
|
+
"location": "global",
|
|
401
|
+
"id": "global::Promise"
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
"return": "Promise<void>"
|
|
405
|
+
},
|
|
406
|
+
"docs": {
|
|
407
|
+
"text": "Share all wishlist products.",
|
|
408
|
+
"tags": []
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
"shareSelected": {
|
|
412
|
+
"complexType": {
|
|
413
|
+
"signature": "() => Promise<void>",
|
|
414
|
+
"parameters": [],
|
|
415
|
+
"references": {
|
|
416
|
+
"Promise": {
|
|
417
|
+
"location": "global",
|
|
418
|
+
"id": "global::Promise"
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
"return": "Promise<void>"
|
|
422
|
+
},
|
|
423
|
+
"docs": {
|
|
424
|
+
"text": "Share the currently selected wishlist products.",
|
|
425
|
+
"tags": []
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
static get elementRef() { return "host"; }
|
|
431
|
+
}
|
|
432
|
+
SallaWishlistActions.pageTitleClass = 's-wishlist-actions-page-title';
|