@salla.sa/twilight-components 2.14.467 → 2.14.468
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{filepond-Li5IcLEr.js → filepond-C1SAyrFq.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-CXgEvsrj.js → filepond-plugin-file-poster-DAhQ7rGa.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-DISjKBXN.js → filepond-plugin-file-validate-size-qfwxpApK.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-BeDqb2RU.js → filepond-plugin-file-validate-type-BbYanfPf.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-CTKgasCY.js → filepond-plugin-image-edit-lWdFhMNt.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-BqvyVbfM.js → filepond-plugin-image-exif-orientation-C2wUYBSb.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-DfX-wD-s.js → filepond-plugin-image-preview-B1ukjrjT.js} +1 -1
- package/dist/cjs/{functions-DXNacMtu.js → functions-DCSgyun2.js} +1 -1
- package/dist/cjs/{index-JuURs8Nc.js → index-CXr_39D8.js} +9 -5
- package/dist/cjs/{index-2n84VIdz.js → index-D3oJJZKW.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{mail-Bgvt2hc9.js → mail-C9D8MHae.js} +2 -2
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +29 -84
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-booking-field_7.cjs.entry.js +11 -11
- package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +91 -7
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +3 -3
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +63 -28
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +32 -2
- package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +4 -4
- package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-map.cjs.entry.js +1 -1
- package/dist/cjs/salla-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-list.cjs.entry.js +259 -64
- package/dist/cjs/salla-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +3 -3
- package/dist/cjs/salla-rating-modal.cjs.entry.js +3 -3
- package/dist/cjs/salla-reward-action_4.cjs.entry.js +3 -3
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/salla-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +252 -32
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +4 -4
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.cjs.entry.js +2 -2
- package/dist/cjs/salla-verify.cjs.entry.js +3 -3
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +329 -0
- package/dist/cjs/{tracked-promise-BdbqBT_O.js → tracked-promise-BsYRgTGD.js} +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-Cj5ogibZ.js → vanilla-picker-DkdzTjSC.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +90 -6
- package/dist/collection/components/salla-gifting/salla-gifting.js +69 -29
- package/dist/collection/components/salla-login-modal/salla-login-modal.js +31 -1
- package/dist/collection/components/salla-product-options/salla-product-options.css +0 -3
- package/dist/collection/components/salla-product-options/salla-product-options.js +28 -84
- package/dist/collection/components/salla-products-list/salla-products-list.css +76 -0
- package/dist/collection/components/salla-products-list/salla-products-list.js +387 -65
- package/dist/collection/components/salla-social-share/salla-social-share.css +161 -0
- package/dist/collection/components/salla-social-share/salla-social-share.js +316 -50
- package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
- package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
- package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
- package/dist/collection/components/salla-wishlist-actions/salla-wishlist-actions.css +65 -0
- package/dist/collection/components/salla-wishlist-actions/salla-wishlist-actions.js +432 -0
- package/dist/components/index.js +5 -5
- package/dist/components/salla-bullet-delivery.js +90 -6
- package/dist/components/salla-gifting.js +63 -27
- package/dist/components/salla-login-modal2.js +31 -1
- package/dist/components/salla-product-options2.js +28 -84
- package/dist/components/salla-products-list2.js +266 -64
- package/dist/components/salla-social-share.js +1 -189
- package/dist/components/salla-social-share2.js +420 -0
- package/dist/components/salla-tab-content2.js +1 -1
- package/dist/components/salla-tab-header2.js +1 -1
- package/dist/components/salla-tabs2.js +1 -1
- package/dist/components/salla-tel-input2.js +1 -1
- package/dist/components/salla-tooltip2.js +1 -1
- package/dist/components/salla-user-settings.js +1 -1
- package/dist/components/salla-wishlist-actions.d.ts +11 -0
- package/dist/components/salla-wishlist-actions.js +375 -0
- package/dist/esm/{filepond-Cpf2HNH9.js → filepond-C4pZr9nR.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-CVurRtjC.js → filepond-plugin-file-poster-CXpAGxT4.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-Dw2xFbfx.js → filepond-plugin-file-validate-size-Dk4M6ge1.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-D6seJVa2.js → filepond-plugin-file-validate-type-DD7qvRsg.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-CBikW78V.js → filepond-plugin-image-edit-DMllAEkg.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-5yNhe9TO.js → filepond-plugin-image-exif-orientation-BRCbcu_E.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-PlAAXB7f.js → filepond-plugin-image-preview-DgeylrwN.js} +1 -1
- package/dist/esm/{functions-Egzz8fEM.js → functions-DrS7by6t.js} +1 -1
- package/dist/esm/{index-Do4FV1UZ.js → index-9SnsJoYO.js} +1 -1
- package/dist/esm/{index-a4x9urdK.js → index-D2yBy7Jh.js} +9 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{mail-DLNIOD9t.js → mail-DzAIgzdz.js} +2 -2
- package/dist/esm/salla-accordion-body_2.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +1 -1
- package/dist/esm/salla-add-product-button_5.entry.js +29 -84
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +1 -1
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-booking-field_7.entry.js +11 -11
- package/dist/esm/salla-bullet-delivery_2.entry.js +91 -7
- package/dist/esm/salla-cart-coupons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
- package/dist/esm/salla-cashback-banner.entry.js +1 -1
- package/dist/esm/salla-comment-form_8.entry.js +1 -1
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +3 -3
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- package/dist/esm/salla-edit-order-button.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +63 -28
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +32 -2
- package/dist/esm/salla-loyalty-banner.entry.js +2 -2
- package/dist/esm/salla-loyalty-hero_2.entry.js +4 -4
- package/dist/esm/salla-loyalty-panel.entry.js +3 -3
- package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-program.entry.js +3 -3
- package/dist/esm/salla-loyalty-reward.entry.js +2 -2
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-map.entry.js +1 -1
- package/dist/esm/salla-menu.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-next-order-coupon.entry.js +1 -1
- package/dist/esm/salla-notification-item.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer-modal.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-branch.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-placeholder.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-product-card-embed.entry.js +1 -1
- package/dist/esm/salla-product-card_2.entry.js +1 -1
- package/dist/esm/salla-product-size-guide.entry.js +1 -1
- package/dist/esm/salla-products-list.entry.js +259 -64
- package/dist/esm/salla-progress-bar.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +3 -3
- package/dist/esm/salla-rating-modal.entry.js +3 -3
- package/dist/esm/salla-reward-action_4.entry.js +3 -3
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +1 -1
- package/dist/esm/salla-slider.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +252 -32
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tab-content_3.entry.js +4 -4
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +2 -2
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +1 -1
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.entry.js +2 -2
- package/dist/esm/salla-verify.entry.js +3 -3
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/salla-wishlist-actions.entry.js +327 -0
- package/dist/esm/{tracked-promise-BX5clCDX.js → tracked-promise-CTcAqNfZ.js} +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-DB0pDHa7.js → vanilla-picker-DfeK45Yv.js} +1 -1
- package/dist/twilight/{p-61b1fd3b.entry.js → p-07af3286.entry.js} +1 -1
- package/dist/twilight/{p-ee605cef.entry.js → p-08337b2b.entry.js} +1 -1
- package/dist/twilight/{p-74a61155.entry.js → p-08771dff.entry.js} +1 -1
- package/dist/twilight/{p-13a033fa.entry.js → p-0e1bab4f.entry.js} +1 -1
- package/dist/twilight/{p-b0bf7a5b.entry.js → p-0eadca17.entry.js} +1 -1
- package/dist/twilight/{p-92b02f3c.entry.js → p-12ccc1ab.entry.js} +1 -1
- package/dist/twilight/{p-52fe97c8.entry.js → p-1574176e.entry.js} +1 -1
- package/dist/twilight/{p-0957f323.entry.js → p-17015f9c.entry.js} +1 -1
- package/dist/twilight/{p-b8ab7da8.entry.js → p-1920b702.entry.js} +1 -1
- package/dist/twilight/{p-91363b7e.entry.js → p-1a1cebfa.entry.js} +1 -1
- package/dist/twilight/{p-1130d4b7.entry.js → p-1a844fda.entry.js} +1 -1
- package/dist/twilight/{p-42a0b54a.entry.js → p-1b7ebf47.entry.js} +1 -1
- package/dist/twilight/{p-e726123e.entry.js → p-223d7ceb.entry.js} +1 -1
- package/dist/twilight/{p-ff270706.entry.js → p-255f5d2a.entry.js} +1 -1
- package/dist/twilight/{p-0da78d4e.entry.js → p-266f57de.entry.js} +1 -1
- package/dist/twilight/p-28bdf8ec.entry.js +4 -0
- package/dist/twilight/{p-fbfacb11.entry.js → p-2c7086ec.entry.js} +1 -1
- package/dist/twilight/{p-d33203b7.entry.js → p-2c7f524a.entry.js} +1 -1
- package/dist/twilight/{p-c60c302f.entry.js → p-30ea9a82.entry.js} +1 -1
- package/dist/twilight/{p-b80adb19.entry.js → p-313d38cd.entry.js} +1 -1
- package/dist/twilight/{p-241bd42e.entry.js → p-315ce27b.entry.js} +1 -1
- package/dist/twilight/p-378d45e2.entry.js +4 -0
- package/dist/twilight/p-3c2fe8cd.entry.js +4 -0
- package/dist/twilight/{p-d905fbca.entry.js → p-3d1e7982.entry.js} +1 -1
- package/dist/twilight/{p-a068fff4.entry.js → p-3d7c0ac6.entry.js} +1 -1
- package/dist/twilight/{p-c0380d40.entry.js → p-3d8d289e.entry.js} +1 -1
- package/dist/twilight/{p-f6bb956c.entry.js → p-4144c908.entry.js} +1 -1
- package/dist/twilight/{p-5b365561.entry.js → p-453a7bb2.entry.js} +1 -1
- package/dist/twilight/{p-6d87b134.entry.js → p-4c457ba5.entry.js} +1 -1
- package/dist/twilight/{p-735fafef.entry.js → p-4d3bcacd.entry.js} +1 -1
- package/dist/twilight/{p-d9d4ea5b.entry.js → p-4dedb514.entry.js} +1 -1
- package/dist/twilight/{p-0b169d4e.entry.js → p-50dfec0a.entry.js} +1 -1
- package/dist/twilight/{p-1ce817c2.entry.js → p-53f83426.entry.js} +1 -1
- package/dist/twilight/{p-afcb0117.entry.js → p-54e9ac89.entry.js} +1 -1
- package/dist/twilight/{p-35ac1fc9.entry.js → p-571b8e00.entry.js} +1 -1
- package/dist/twilight/{p-9dc0fec4.entry.js → p-5a5057a8.entry.js} +1 -1
- package/dist/twilight/{p-ec073354.entry.js → p-5a9b94f8.entry.js} +1 -1
- package/dist/twilight/{p-9b639078.entry.js → p-5c1c520a.entry.js} +1 -1
- package/dist/twilight/{p-f170aff7.entry.js → p-5d06fe77.entry.js} +1 -1
- package/dist/twilight/{p-ec5ae058.entry.js → p-5e433652.entry.js} +1 -1
- package/dist/twilight/{p-b0ed6a9f.entry.js → p-6046666d.entry.js} +1 -1
- package/dist/twilight/{p-10e0936d.entry.js → p-67e23040.entry.js} +1 -1
- package/dist/twilight/{p-fa039238.entry.js → p-6c777951.entry.js} +1 -1
- package/dist/twilight/{p-53cbb271.entry.js → p-749dbf27.entry.js} +1 -1
- package/dist/twilight/p-7bd464f3.entry.js +4 -0
- package/dist/twilight/{p-c8fd03c0.entry.js → p-7ffc1711.entry.js} +1 -1
- package/dist/twilight/{p-89f11893.entry.js → p-83b6c374.entry.js} +1 -1
- package/dist/twilight/{p-bfbf8121.entry.js → p-8b5d26d3.entry.js} +1 -1
- package/dist/twilight/{p-92f3ea44.entry.js → p-9a0514dd.entry.js} +1 -1
- package/dist/twilight/{p-f5135cb5.entry.js → p-9ba953ab.entry.js} +1 -1
- package/dist/twilight/{p-BVqg7xd9.js → p-BGpAIcg-.js} +1 -1
- package/dist/twilight/{p-fCaOxwGH.js → p-BHkz1ssL.js} +1 -1
- package/dist/twilight/{p-CsMnvJkR.js → p-BZhp8a87.js} +1 -1
- package/dist/twilight/p-Bo1nXenO.js +4 -0
- package/dist/twilight/{p-D9ni3BuG.js → p-BojnM4VS.js} +1 -1
- package/dist/twilight/{p-B7KW0zhB.js → p-CBU9I-zy.js} +1 -1
- package/dist/twilight/{p-pOgjUtf9.js → p-CGd7EQZr.js} +1 -1
- package/dist/twilight/{p-EPfEwqOC.js → p-D01LipFK.js} +1 -1
- package/dist/twilight/{p-a4x9urdK.js → p-D2yBy7Jh.js} +2 -2
- package/dist/twilight/{p-DiWHgCMH.js → p-DSgSJMud.js} +1 -1
- package/dist/twilight/{p-DLNIOD9t.js → p-DzAIgzdz.js} +1 -1
- package/dist/twilight/{p-fe506679.entry.js → p-a0d88c4d.entry.js} +1 -1
- package/dist/twilight/{p-f684d7bf.entry.js → p-a2b53a52.entry.js} +1 -1
- package/dist/twilight/{p-78020271.entry.js → p-a3e1fafc.entry.js} +1 -1
- package/dist/twilight/{p-fdde8399.entry.js → p-a463d567.entry.js} +1 -1
- package/dist/twilight/{p-ba1199ba.entry.js → p-a6a9e398.entry.js} +1 -1
- package/dist/twilight/{p-0405f5e8.entry.js → p-a79f60e6.entry.js} +1 -1
- package/dist/twilight/{p-0bdf58a4.entry.js → p-aadfd70e.entry.js} +1 -1
- package/dist/twilight/{p-ad19661d.entry.js → p-ad0a27e2.entry.js} +1 -1
- package/dist/twilight/{p-e90d18b2.entry.js → p-ae8bd2e7.entry.js} +1 -1
- package/dist/twilight/{p-d17596ff.entry.js → p-af121bbf.entry.js} +1 -1
- package/dist/twilight/p-b0f28806.entry.js +4 -0
- package/dist/twilight/{p-0b1970c2.entry.js → p-b3f6b725.entry.js} +1 -1
- package/dist/twilight/{p-1a37b959.entry.js → p-b7e720e8.entry.js} +1 -1
- package/dist/twilight/{p-a53d5944.entry.js → p-b80016c8.entry.js} +1 -1
- package/dist/twilight/{p-635347c9.entry.js → p-c0f40eea.entry.js} +1 -1
- package/dist/twilight/p-c4bc10c1.entry.js +4 -0
- package/dist/twilight/p-c637b6bb.entry.js +4 -0
- package/dist/twilight/{p-127ee640.entry.js → p-c6e18746.entry.js} +1 -1
- package/dist/twilight/{p-5803c158.entry.js → p-cb855cb3.entry.js} +1 -1
- package/dist/twilight/{p-4d393389.entry.js → p-cbc44b3e.entry.js} +1 -1
- package/dist/twilight/{p-6d47892b.entry.js → p-cbf547f0.entry.js} +1 -1
- package/dist/twilight/{p-e27363dd.entry.js → p-cebad615.entry.js} +1 -1
- package/dist/twilight/{p-316135f8.entry.js → p-cfd910a8.entry.js} +1 -1
- package/dist/twilight/{p-d0340e11.entry.js → p-d0a8b9be.entry.js} +1 -1
- package/dist/twilight/{p-59f7f014.entry.js → p-d0cae7da.entry.js} +1 -1
- package/dist/twilight/{p-03d13b9f.entry.js → p-d861eea6.entry.js} +1 -1
- package/dist/twilight/p-daa9c0b3.entry.js +4 -0
- package/dist/twilight/{p-59f815bc.entry.js → p-db43fa93.entry.js} +1 -1
- package/dist/twilight/{p-e1205d19.entry.js → p-e06a7e19.entry.js} +1 -1
- package/dist/twilight/{p-0c748664.entry.js → p-e34f68e0.entry.js} +1 -1
- package/dist/twilight/{p-08b2c781.entry.js → p-e4cac2a9.entry.js} +1 -1
- package/dist/twilight/{p-056400a1.entry.js → p-e5de1833.entry.js} +1 -1
- package/dist/twilight/{p-fa1cc092.entry.js → p-e80ee5b0.entry.js} +6 -6
- package/dist/twilight/{p-16bcc5ab.entry.js → p-e8ffc069.entry.js} +1 -1
- package/dist/twilight/{p-2bcfb4f3.entry.js → p-ee8c7a5a.entry.js} +1 -1
- package/dist/twilight/p-f0dedf42.entry.js +4 -0
- package/dist/twilight/{p-37457147.entry.js → p-f3a01895.entry.js} +1 -1
- package/dist/twilight/{p-ef8fb222.entry.js → p-fb56a444.entry.js} +1 -1
- package/dist/twilight/{p-e8a82952.entry.js → p-fe1bced4.entry.js} +1 -1
- package/dist/twilight/{p-DSBkBAFI.js → p-paiaALkJ.js} +1 -1
- package/dist/twilight/{p-CkA6UKAD.js → p-xz8gqXL9.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-bullet-delivery/salla-bullet-delivery.d.ts +16 -0
- package/dist/types/components/salla-gifting/gift-schema.d.ts +4 -0
- package/dist/types/components/salla-gifting/salla-gifting.d.ts +4 -1
- package/dist/types/components/salla-login-modal/salla-login-modal.d.ts +2 -0
- package/dist/types/components/salla-product-options/salla-product-options.d.ts +0 -11
- package/dist/types/components/salla-products-list/salla-products-list.d.ts +60 -6
- package/dist/types/components/salla-social-share/salla-social-share.d.ts +39 -2
- package/dist/types/components/salla-wishlist-actions/salla-wishlist-actions.d.ts +93 -0
- package/dist/types/components.d.ts +172 -18
- package/package.json +5 -5
- package/dist/twilight/p-234fdf72.entry.js +0 -4
- package/dist/twilight/p-3fbd88d0.entry.js +0 -4
- package/dist/twilight/p-7a1cfd65.entry.js +0 -4
- package/dist/twilight/p-865c602e.entry.js +0 -4
- package/dist/twilight/p-9df5c9a7.entry.js +0 -4
- package/dist/twilight/p-C4aFleDM.js +0 -4
- package/dist/twilight/p-e485d0b8.entry.js +0 -4
- package/dist/twilight/p-f5072671.entry.js +0 -4
- package/dist/twilight/p-fb7904e6.entry.js +0 -4
|
@@ -3,17 +3,18 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-CXr_39D8.js');
|
|
7
7
|
var anime_es = require('./anime.es-BqW8JHZi.js');
|
|
8
8
|
var shoppingBag = require('./shopping-bag-C1gvTVHr.js');
|
|
9
9
|
var Helper = require('./Helper-CgGR9Qf8.js');
|
|
10
10
|
|
|
11
|
-
const sallaProductsListCss = "";
|
|
11
|
+
const sallaProductsListCss = ".s-products-list-selectable-item{position:relative;border-radius:0.5rem;transition:box-shadow 0.15s ease-in-out}.s-products-list-item-selected{box-shadow:0 0 0 2px var(--color-primary)}.s-products-list-select-control{position:absolute;top:10px;inset-inline-start:10px;z-index:5;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.s-products-list-select-checkbox{appearance:none;-webkit-appearance:none;-moz-appearance:none;position:relative;width:22px;height:22px;margin:0;cursor:pointer;color:var(--color-primary);border:1px solid rgba(0, 0, 0, 0.15);border-radius:6px;background-color:#fff;box-shadow:0 1px 3px rgba(0, 0, 0, 0.2);transition:background-color 0.15s ease-in-out, border-color 0.15s ease-in-out}.s-products-list-select-checkbox:hover{border-color:var(--color-primary)}.s-products-list-select-checkbox:focus,.s-products-list-select-checkbox:focus-visible{outline:none;border-color:var(--color-primary);box-shadow:0 1px 3px rgba(0, 0, 0, 0.2), 0 0 0 3px color-mix(in srgb, var(--color-primary) 30%, transparent)}.s-products-list-select-checkbox:checked,.s-products-list-select-checkbox:checked:hover,.s-products-list-select-checkbox:checked:focus{background-color:var(--color-primary);border-color:var(--color-primary)}.s-products-list-select-checkbox:checked::after{content:\"\";position:absolute;top:50%;left:50%;width:5px;height:10px;border:solid #fff;border-width:0 2px 2px 0;transform:translate(-50%, -60%) rotate(45deg)}.s-products-list-row-cards .s-products-list-select-control{top:50%;inset-inline-start:14px;transform:translateY(-50%)}.s-products-list-row-cards .s-products-list-selectable-item>:not(.s-products-list-select-control){padding-inline-start:2.75rem}";
|
|
12
12
|
|
|
13
13
|
const SallaProductsList = class {
|
|
14
14
|
constructor(hostRef) {
|
|
15
15
|
index.registerInstance(this, hostRef);
|
|
16
16
|
this.productsFetched = index.createEvent(this, "productsFetched");
|
|
17
|
+
this.selectionChanged = index.createEvent(this, "selectionChanged");
|
|
17
18
|
/**
|
|
18
19
|
* Autoload next page when scroll
|
|
19
20
|
*/
|
|
@@ -28,6 +29,18 @@ const SallaProductsList = class {
|
|
|
28
29
|
* <salla-products-list product-card-component="my-custom-card-style2" ...
|
|
29
30
|
*/
|
|
30
31
|
this.productCardComponent = 'custom-salla-product-card';
|
|
32
|
+
/**
|
|
33
|
+
* Enables multi-selection of products. When enabled, a checkbox overlay is
|
|
34
|
+
* rendered on top of each product card and the selected products are exposed
|
|
35
|
+
* via the `selectionChanged` event, the `salla-products-list::selection.changed`
|
|
36
|
+
* global event and the `getSelected()` method.
|
|
37
|
+
*
|
|
38
|
+
* This is source-agnostic (works for any `source`) and defaults to `false`.
|
|
39
|
+
* On the wishlist page the `salla-wishlist-actions` panel turns it on at
|
|
40
|
+
* runtime (when the customer chooses "share specific items"), so no theme
|
|
41
|
+
* markup changes are required.
|
|
42
|
+
*/
|
|
43
|
+
this.selectable = false;
|
|
31
44
|
// State
|
|
32
45
|
this.page = 1;
|
|
33
46
|
this.placeholderText = salla.lang.get('pages.categories.no_products');
|
|
@@ -35,10 +48,12 @@ const SallaProductsList = class {
|
|
|
35
48
|
this.failedLoadMore = salla.lang.get('common.elements.failed_to_load_more');
|
|
36
49
|
this.currentPage = salla.config.get('page');
|
|
37
50
|
this.filtersSnapshot = [];
|
|
38
|
-
|
|
39
|
-
this.
|
|
40
|
-
this.
|
|
41
|
-
this.
|
|
51
|
+
/** Map of selected products keyed by product id (preserves selection across pagination). */
|
|
52
|
+
this.selectedProducts = new Map();
|
|
53
|
+
this.lastViewedProductKey = 'lastViewedProductId';
|
|
54
|
+
this.filtersKey = 'filters';
|
|
55
|
+
this.infiniteScrollStateKey = 'infiniteScrollState';
|
|
56
|
+
this.prevCategoryIdKey = 'prevCategoryId';
|
|
42
57
|
this.isProcessing = false; // Tracks if we are processing data
|
|
43
58
|
this.scrollTimeout = null;
|
|
44
59
|
this.boundScrollToLastViewedProduct = () => this.scrollToLastViewedProduct();
|
|
@@ -47,7 +62,44 @@ const SallaProductsList = class {
|
|
|
47
62
|
'product.index.latest': 'latest',
|
|
48
63
|
'product.index.offers': 'offers',
|
|
49
64
|
'product.index.search': 'search',
|
|
50
|
-
'product.index.sales': 'sales'
|
|
65
|
+
'product.index.sales': 'sales',
|
|
66
|
+
};
|
|
67
|
+
this.onWishlistItemRemoved = (_response, productId) => {
|
|
68
|
+
if (this.getSource() !== 'wishlist' || !this.wrapper) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const normalizedId = String(productId);
|
|
72
|
+
const cardTag = this.hasCustomComponent ? this.productCardComponent : 'salla-product-card';
|
|
73
|
+
for (const child of Array.from(this.wrapper.children)) {
|
|
74
|
+
const listItem = child;
|
|
75
|
+
const card = child.querySelector(cardTag);
|
|
76
|
+
const id = listItem.product?.id ?? card?.product?.id;
|
|
77
|
+
if (id != null && String(id) === normalizedId) {
|
|
78
|
+
child.remove();
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
// Theme may remove the card first and leave an empty selectable shell.
|
|
83
|
+
for (const child of Array.from(this.wrapper.children)) {
|
|
84
|
+
if (!child.classList.contains('s-products-list-selectable-item')) {
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
const listItem = child;
|
|
88
|
+
if (listItem.product?.id != null &&
|
|
89
|
+
String(listItem.product.id) === normalizedId &&
|
|
90
|
+
!child.querySelector(cardTag)) {
|
|
91
|
+
child.remove();
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (this.selectable) {
|
|
96
|
+
for (const id of Array.from(this.selectedProducts.keys())) {
|
|
97
|
+
if (String(id) === normalizedId) {
|
|
98
|
+
this.selectedProducts.delete(id);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
this.emitSelection();
|
|
102
|
+
}
|
|
51
103
|
};
|
|
52
104
|
//TODO:: check why `this.includes` not working!!
|
|
53
105
|
this.includes = Helper.Helper.parseJson(this.includes || this.host.getAttribute('includes'));
|
|
@@ -64,15 +116,17 @@ const SallaProductsList = class {
|
|
|
64
116
|
}
|
|
65
117
|
connectedCallback() {
|
|
66
118
|
//Override browser scroll restoration default behaviour
|
|
67
|
-
if (
|
|
68
|
-
history.scrollRestoration =
|
|
119
|
+
if ('scrollRestoration' in history)
|
|
120
|
+
history.scrollRestoration = 'manual';
|
|
69
121
|
// required for scroll restoration case when the component loads before DOM content is completed (slow internet bandwidth /low device specs)
|
|
70
122
|
window.addEventListener('DOMContentLoaded', this.boundScrollToLastViewedProduct);
|
|
71
123
|
salla.event.on('salla-filters::changed', filters => this.setFilters(filters));
|
|
124
|
+
salla.event.on('wishlist::removed', this.onWishlistItemRemoved);
|
|
72
125
|
}
|
|
73
126
|
disconnectedCallback() {
|
|
74
127
|
window.removeEventListener('DOMContentLoaded', this.boundScrollToLastViewedProduct);
|
|
75
128
|
window.removeEventListener('scroll', this.boundHandleScroll);
|
|
129
|
+
salla.event.off('wishlist::removed', this.onWishlistItemRemoved);
|
|
76
130
|
}
|
|
77
131
|
/**
|
|
78
132
|
* Set parsed filters data from URI
|
|
@@ -85,7 +139,9 @@ const SallaProductsList = class {
|
|
|
85
139
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
86
140
|
// Create a deep copy of the filters object to avoid mutating the original object
|
|
87
141
|
this.parsedFilters = JSON.parse(JSON.stringify(filters));
|
|
88
|
-
if (this.currentPage?.slug ==
|
|
142
|
+
if (this.currentPage?.slug == 'product.index' &&
|
|
143
|
+
this.parsedFilters &&
|
|
144
|
+
this.parsedFilters.category_id) {
|
|
89
145
|
this.currentCategoryIdFilter = [this.parsedFilters.category_id];
|
|
90
146
|
}
|
|
91
147
|
return this.reload();
|
|
@@ -173,12 +229,12 @@ const SallaProductsList = class {
|
|
|
173
229
|
}
|
|
174
230
|
this.nextPage += '&filterable=1';
|
|
175
231
|
for (const [key, value] of Object.entries(this.parsedFilters || {})) {
|
|
176
|
-
if ([
|
|
232
|
+
if (['string', 'number'].includes(typeof value)) {
|
|
177
233
|
// @ts-ignore
|
|
178
234
|
this.nextPage += `&filters[${encodeURIComponent(key)}]=${encodeURIComponent(value)}`;
|
|
179
235
|
}
|
|
180
236
|
else if (Array.isArray(value)) {
|
|
181
|
-
value.forEach(item => this.nextPage += `&filters[${encodeURIComponent(key)}][]=${encodeURIComponent(item)}`);
|
|
237
|
+
value.forEach(item => (this.nextPage += `&filters[${encodeURIComponent(key)}][]=${encodeURIComponent(item)}`));
|
|
182
238
|
}
|
|
183
239
|
else if (typeof value === 'object') {
|
|
184
240
|
for (const [k, v] of Object.entries(value)) {
|
|
@@ -232,7 +288,9 @@ const SallaProductsList = class {
|
|
|
232
288
|
//as a request they don't want to let the user to open the product details
|
|
233
289
|
//todo:: find a better way to handle this request
|
|
234
290
|
this.getSource() === 'landing-page' && (product.url = '');
|
|
235
|
-
const customComponentTag = this.hasCustomComponent
|
|
291
|
+
const customComponentTag = this.hasCustomComponent
|
|
292
|
+
? this.productCardComponent
|
|
293
|
+
: 'salla-product-card';
|
|
236
294
|
const productCard = document.createElement(customComponentTag);
|
|
237
295
|
productCard.product = product;
|
|
238
296
|
// Apply compact layout if requested - set both property and attribute for compatibility
|
|
@@ -243,7 +301,7 @@ const SallaProductsList = class {
|
|
|
243
301
|
this.applyLandingPageStyles(productCard);
|
|
244
302
|
this.applyHorizontalCardStyles(productCard);
|
|
245
303
|
// Attach click event listener to save the current products snapshot
|
|
246
|
-
productCard.addEventListener('click',
|
|
304
|
+
productCard.addEventListener('click', event => {
|
|
247
305
|
const target = event.target;
|
|
248
306
|
// Check if the clicked element is an anchor or inside an anchor
|
|
249
307
|
const anchor = target.closest('a');
|
|
@@ -255,8 +313,69 @@ const SallaProductsList = class {
|
|
|
255
313
|
}
|
|
256
314
|
}
|
|
257
315
|
});
|
|
316
|
+
if (this.selectable) {
|
|
317
|
+
return this.wrapSelectableItem(productCard, product);
|
|
318
|
+
}
|
|
258
319
|
return productCard;
|
|
259
320
|
}
|
|
321
|
+
/**
|
|
322
|
+
* Wrap a product card with a selection control. The wrapper mirrors `product`
|
|
323
|
+
* so the scroll-restoration snapshot logic (which reads `child.product`) keeps
|
|
324
|
+
* working, and the card keeps its id for `scrollToLastViewedProduct`.
|
|
325
|
+
*/
|
|
326
|
+
wrapSelectableItem(productCard, product) {
|
|
327
|
+
const container = document.createElement('div');
|
|
328
|
+
container.className = 's-products-list-selectable-item';
|
|
329
|
+
container.product = product;
|
|
330
|
+
const isSelected = this.selectedProducts.has(product.id);
|
|
331
|
+
if (isSelected) {
|
|
332
|
+
container.classList.add('s-products-list-item-selected');
|
|
333
|
+
}
|
|
334
|
+
const control = document.createElement('label');
|
|
335
|
+
control.className = 's-products-list-select-control';
|
|
336
|
+
control.setAttribute('aria-label', salla.lang.get('common.elements.select', 'تحديد'));
|
|
337
|
+
const checkbox = document.createElement('input');
|
|
338
|
+
checkbox.type = 'checkbox';
|
|
339
|
+
checkbox.className = 's-products-list-select-checkbox';
|
|
340
|
+
checkbox.checked = isSelected;
|
|
341
|
+
checkbox.addEventListener('change', () => this.toggleSelection(product, container, checkbox.checked));
|
|
342
|
+
control.appendChild(checkbox);
|
|
343
|
+
container.appendChild(control);
|
|
344
|
+
container.appendChild(productCard);
|
|
345
|
+
return container;
|
|
346
|
+
}
|
|
347
|
+
toggleSelection(product, container, checked) {
|
|
348
|
+
if (checked) {
|
|
349
|
+
this.selectedProducts.set(product.id, product);
|
|
350
|
+
container?.classList.add('s-products-list-item-selected');
|
|
351
|
+
}
|
|
352
|
+
else {
|
|
353
|
+
this.selectedProducts.delete(product.id);
|
|
354
|
+
container?.classList.remove('s-products-list-item-selected');
|
|
355
|
+
}
|
|
356
|
+
this.emitSelection();
|
|
357
|
+
}
|
|
358
|
+
emitSelection() {
|
|
359
|
+
const products = Array.from(this.selectedProducts.values());
|
|
360
|
+
const ids = Array.from(this.selectedProducts.keys());
|
|
361
|
+
const detail = { ids, products, count: ids.length };
|
|
362
|
+
this.selectionChanged.emit(detail);
|
|
363
|
+
salla.event.emit('salla-products-list::selection.changed', detail);
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Re-render the list when selection mode is toggled at runtime (e.g. enabled
|
|
367
|
+
* by the wishlist actions panel after the list already loaded).
|
|
368
|
+
*/
|
|
369
|
+
onSelectableChanged(newValue, oldValue) {
|
|
370
|
+
if (newValue === oldValue || !this.isReady || !this.wrapper) {
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
if (!newValue) {
|
|
374
|
+
this.selectedProducts.clear();
|
|
375
|
+
this.emitSelection();
|
|
376
|
+
}
|
|
377
|
+
this.reload();
|
|
378
|
+
}
|
|
260
379
|
applyLandingPageStyles(productCard) {
|
|
261
380
|
if (this.getSource() === 'landing-page' && !this.hasCustomComponent) {
|
|
262
381
|
productCard.toggleAttribute('hide-add-btn', true);
|
|
@@ -274,7 +393,7 @@ const SallaProductsList = class {
|
|
|
274
393
|
}
|
|
275
394
|
waitForResizing(element) {
|
|
276
395
|
let timeout = null;
|
|
277
|
-
return new Promise(
|
|
396
|
+
return new Promise(resolve => {
|
|
278
397
|
const resizeObserver = new ResizeObserver(() => {
|
|
279
398
|
clearTimeout(timeout);
|
|
280
399
|
timeout = setTimeout(() => {
|
|
@@ -287,7 +406,7 @@ const SallaProductsList = class {
|
|
|
287
406
|
}
|
|
288
407
|
waitForLayoutStable(element) {
|
|
289
408
|
let timeout = null;
|
|
290
|
-
return new Promise(
|
|
409
|
+
return new Promise(resolve => {
|
|
291
410
|
const observer = new MutationObserver(() => {
|
|
292
411
|
clearTimeout(timeout);
|
|
293
412
|
timeout = setTimeout(() => {
|
|
@@ -307,15 +426,14 @@ const SallaProductsList = class {
|
|
|
307
426
|
// Wait for DOM mutations and layout shifts to stabilize
|
|
308
427
|
return await Promise.allSettled([
|
|
309
428
|
this.waitForResizing(element),
|
|
310
|
-
this.waitForLayoutStable(element)
|
|
429
|
+
this.waitForLayoutStable(element),
|
|
311
430
|
]);
|
|
312
431
|
}
|
|
313
432
|
scrollToLastViewedProduct() {
|
|
314
433
|
const lastViewedProductId = sessionStorage.getItem(this.lastViewedProductKey);
|
|
315
434
|
if (!lastViewedProductId || salla.url.is_page('product.single'))
|
|
316
435
|
return;
|
|
317
|
-
this.isElementLoaded(`[id*="${lastViewedProductId}"]`)
|
|
318
|
-
.then(() => {
|
|
436
|
+
this.isElementLoaded(`[id*="${lastViewedProductId}"]`).then(() => {
|
|
319
437
|
const productCard = this.wrapper?.querySelector(`[id*="${lastViewedProductId}"]`);
|
|
320
438
|
if (!productCard)
|
|
321
439
|
return;
|
|
@@ -323,8 +441,12 @@ const SallaProductsList = class {
|
|
|
323
441
|
const scrollToProductCard = () => {
|
|
324
442
|
// calculations is located here for last second changes in the ui (ie. sticky header height)
|
|
325
443
|
productCard.scrollIntoView({ block: 'start', behavior: 'instant' });
|
|
326
|
-
const headerSelector = matchMedia('(max-width: 1024px)').matches
|
|
327
|
-
|
|
444
|
+
const headerSelector = matchMedia('(max-width: 1024px)').matches
|
|
445
|
+
? 'header .inner'
|
|
446
|
+
: 'ul.main-menu';
|
|
447
|
+
const headerHeight = window?.header_is_sticky
|
|
448
|
+
? (document.querySelector(headerSelector)?.getBoundingClientRect()?.height ?? 56)
|
|
449
|
+
: 0;
|
|
328
450
|
const cardsListRowGap = parseInt(getComputedStyle(this.wrapper).rowGap) ?? 16;
|
|
329
451
|
const productCardOffset = headerHeight + cardsListRowGap;
|
|
330
452
|
scrollBy({ top: productCardOffset * -1, behavior: 'instant' });
|
|
@@ -332,7 +454,7 @@ const SallaProductsList = class {
|
|
|
332
454
|
//start scrolling to the product card position
|
|
333
455
|
requestAnimationFrame(scrollToProductCard);
|
|
334
456
|
const productImages = productCard.querySelectorAll('img.lazy');
|
|
335
|
-
productImages.forEach(
|
|
457
|
+
productImages.forEach(image => {
|
|
336
458
|
const productImage = image;
|
|
337
459
|
const handleImageEvent = () => {
|
|
338
460
|
requestAnimationFrame(scrollToProductCard);
|
|
@@ -349,16 +471,15 @@ const SallaProductsList = class {
|
|
|
349
471
|
});
|
|
350
472
|
}
|
|
351
473
|
isElementLoaded(selector) {
|
|
352
|
-
return new Promise(
|
|
474
|
+
return new Promise(resolve => {
|
|
353
475
|
const interval = setInterval(() => {
|
|
354
476
|
if (document.querySelector(selector)) {
|
|
355
477
|
clearInterval(interval);
|
|
356
478
|
return resolve(document.querySelector(selector));
|
|
357
479
|
}
|
|
358
480
|
}, 50);
|
|
359
|
-
})
|
|
481
|
+
});
|
|
360
482
|
}
|
|
361
|
-
;
|
|
362
483
|
takeStateSnapshot() {
|
|
363
484
|
const currentPageData = [];
|
|
364
485
|
// Classic for-loop for performance
|
|
@@ -369,7 +490,7 @@ const SallaProductsList = class {
|
|
|
369
490
|
const scrollState = {
|
|
370
491
|
pageIndex: Math.max((this.infiniteScroll?.pageIndex ?? 1) - 1, 1),
|
|
371
492
|
nextPage: this.nextPage,
|
|
372
|
-
currentPageData
|
|
493
|
+
currentPageData,
|
|
373
494
|
};
|
|
374
495
|
if (this.isFilterable()) {
|
|
375
496
|
const existingFilters = sessionStorage.getItem(this.filtersKey);
|
|
@@ -416,9 +537,8 @@ const SallaProductsList = class {
|
|
|
416
537
|
const isDifferentCategory = currentPageSlug
|
|
417
538
|
? prevCategory !== currentPageSlug // Compare slugs for special pages
|
|
418
539
|
: prevCategory !== String(currentPageId); // Compare IDs otherwise
|
|
419
|
-
if ((prevCategory && isDifferentCategory && !isHomepage && !isProductPage)
|
|
420
|
-
|
|
421
|
-
(isHomepage && !this.hasInfiniteScroll)) {
|
|
540
|
+
if ((prevCategory && isDifferentCategory && !isHomepage && !isProductPage) ||
|
|
541
|
+
(isHomepage && !this.hasInfiniteScroll)) {
|
|
422
542
|
this.removeScrollRestorationSession();
|
|
423
543
|
this.switchToNormalBehavior = true;
|
|
424
544
|
return false;
|
|
@@ -462,7 +582,9 @@ const SallaProductsList = class {
|
|
|
462
582
|
return ['json', 'selected', 'related', 'landing-page', 'recently'].includes(this.getSource());
|
|
463
583
|
}
|
|
464
584
|
getSourceValue() {
|
|
465
|
-
return this.currentCategoryIdFilter
|
|
585
|
+
return this.currentCategoryIdFilter
|
|
586
|
+
? this.currentCategoryIdFilter
|
|
587
|
+
: Helper.Helper.getProductsSourceValue(this.source, this.sourceValue);
|
|
466
588
|
}
|
|
467
589
|
logFetchError(errorPhase, error, fetchPath, http, response) {
|
|
468
590
|
try {
|
|
@@ -473,7 +595,9 @@ const SallaProductsList = class {
|
|
|
473
595
|
source: this.getSource(),
|
|
474
596
|
sourceValue: typeof sourceValue === 'string' && sourceValue.length > 200
|
|
475
597
|
? `${sourceValue.slice(0, 200)}…`
|
|
476
|
-
: Array.isArray(sourceValue)
|
|
598
|
+
: Array.isArray(sourceValue)
|
|
599
|
+
? { length: sourceValue.length }
|
|
600
|
+
: sourceValue,
|
|
477
601
|
pageIndex: this.infiniteScroll?.pageIndex,
|
|
478
602
|
fetchPath,
|
|
479
603
|
httpStatus: http?.status,
|
|
@@ -490,7 +614,9 @@ const SallaProductsList = class {
|
|
|
490
614
|
: {}),
|
|
491
615
|
});
|
|
492
616
|
}
|
|
493
|
-
catch {
|
|
617
|
+
catch {
|
|
618
|
+
/* analytics */
|
|
619
|
+
}
|
|
494
620
|
}
|
|
495
621
|
appendDataLayer(data) {
|
|
496
622
|
if (typeof dataLayer !== 'object' || !Array.isArray(dataLayer)) {
|
|
@@ -498,29 +624,29 @@ const SallaProductsList = class {
|
|
|
498
624
|
return;
|
|
499
625
|
}
|
|
500
626
|
dataLayer.push({
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
627
|
+
event: 'impressions',
|
|
628
|
+
ecommerce: {
|
|
629
|
+
currencyCode: salla.config.currency().code,
|
|
504
630
|
// "event_id":"", // todo
|
|
505
|
-
|
|
631
|
+
impressions: data.map((product, index) => {
|
|
506
632
|
return {
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
633
|
+
id: product.id,
|
|
634
|
+
name: product.name,
|
|
635
|
+
price: product.price,
|
|
636
|
+
brand: product.brand?.name || '',
|
|
637
|
+
quantity: product.quantity,
|
|
512
638
|
// "variant": "",
|
|
513
|
-
|
|
639
|
+
categories: [
|
|
514
640
|
{
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
}
|
|
641
|
+
name: product.category?.name || salla.config.get('page.title'),
|
|
642
|
+
id: salla.config.get('page.id'),
|
|
643
|
+
},
|
|
518
644
|
],
|
|
519
|
-
|
|
520
|
-
|
|
645
|
+
category: product.category?.name || salla.config.get('page.title'),
|
|
646
|
+
position: index + 1,
|
|
521
647
|
};
|
|
522
|
-
})
|
|
523
|
-
}
|
|
648
|
+
}),
|
|
649
|
+
},
|
|
524
650
|
});
|
|
525
651
|
}
|
|
526
652
|
initiateInfiniteScroll() {
|
|
@@ -533,7 +659,7 @@ const SallaProductsList = class {
|
|
|
533
659
|
history: false,
|
|
534
660
|
nextPage: this.nextPage,
|
|
535
661
|
scrollThreshold: shouldApplyManualLoad ? false : this.autoload ? 100 : false,
|
|
536
|
-
loadOnScroll: shouldApplyManualLoad ? false : this.autoload
|
|
662
|
+
loadOnScroll: shouldApplyManualLoad ? false : this.autoload,
|
|
537
663
|
}, true);
|
|
538
664
|
this.infiniteScroll.pageIndex = this.page;
|
|
539
665
|
this.infiniteScroll?.on('request', () => {
|
|
@@ -644,11 +770,13 @@ const SallaProductsList = class {
|
|
|
644
770
|
}
|
|
645
771
|
getInitialData() {
|
|
646
772
|
this.loading();
|
|
647
|
-
return salla.api.withoutNotifier(() => salla.product.api
|
|
773
|
+
return salla.api.withoutNotifier(() => salla.product.api
|
|
774
|
+
.fetch({
|
|
648
775
|
source: Helper.Helper.getApiSource(this.getSource()),
|
|
649
776
|
source_value: this.getSourceValue(),
|
|
650
|
-
limit: this.limit
|
|
651
|
-
})
|
|
777
|
+
limit: this.limit,
|
|
778
|
+
})
|
|
779
|
+
.then(async (response) => {
|
|
652
780
|
if (!response.data.length) {
|
|
653
781
|
this.showPlaceholder = true;
|
|
654
782
|
this.placeholderLoader && this.placeholderLoader.remove();
|
|
@@ -672,9 +800,65 @@ const SallaProductsList = class {
|
|
|
672
800
|
async loadMore() {
|
|
673
801
|
this.infiniteScroll?.loadNextPage();
|
|
674
802
|
}
|
|
803
|
+
/**
|
|
804
|
+
* Get the currently selected products.
|
|
805
|
+
*/
|
|
806
|
+
async getSelected() {
|
|
807
|
+
return {
|
|
808
|
+
ids: Array.from(this.selectedProducts.keys()),
|
|
809
|
+
products: Array.from(this.selectedProducts.values()),
|
|
810
|
+
};
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* Get all products currently rendered in the list (works whether selection
|
|
814
|
+
* is enabled or not). Useful to gather ids for "share all".
|
|
815
|
+
*/
|
|
816
|
+
async getLoadedProducts() {
|
|
817
|
+
const products = [];
|
|
818
|
+
if (!this.wrapper) {
|
|
819
|
+
return products;
|
|
820
|
+
}
|
|
821
|
+
for (let i = 0; i < this.wrapper.children.length; i++) {
|
|
822
|
+
const item = this.wrapper.children[i];
|
|
823
|
+
item?.product && products.push(item.product);
|
|
824
|
+
}
|
|
825
|
+
return products;
|
|
826
|
+
}
|
|
827
|
+
/**
|
|
828
|
+
* Select all currently rendered products.
|
|
829
|
+
*/
|
|
830
|
+
async selectAll() {
|
|
831
|
+
if (!this.selectable || !this.wrapper) {
|
|
832
|
+
return;
|
|
833
|
+
}
|
|
834
|
+
for (let i = 0; i < this.wrapper.children.length; i++) {
|
|
835
|
+
const item = this.wrapper.children[i];
|
|
836
|
+
if (item?.product) {
|
|
837
|
+
this.selectedProducts.set(item.product.id, item.product);
|
|
838
|
+
item.classList.add('s-products-list-item-selected');
|
|
839
|
+
const checkbox = item.querySelector('.s-products-list-select-checkbox');
|
|
840
|
+
checkbox && (checkbox.checked = true);
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
this.emitSelection();
|
|
844
|
+
}
|
|
845
|
+
/**
|
|
846
|
+
* Clear the current selection.
|
|
847
|
+
*/
|
|
848
|
+
async clearSelection() {
|
|
849
|
+
this.selectedProducts.clear();
|
|
850
|
+
if (this.wrapper) {
|
|
851
|
+
this.wrapper
|
|
852
|
+
.querySelectorAll('.s-products-list-select-checkbox')
|
|
853
|
+
.forEach((checkbox) => (checkbox.checked = false));
|
|
854
|
+
this.wrapper
|
|
855
|
+
.querySelectorAll('.s-products-list-item-selected')
|
|
856
|
+
.forEach(item => item.classList.remove('s-products-list-item-selected'));
|
|
857
|
+
}
|
|
858
|
+
this.emitSelection();
|
|
859
|
+
}
|
|
675
860
|
componentWillLoad() {
|
|
676
|
-
return salla.onReady()
|
|
677
|
-
.then(async () => {
|
|
861
|
+
return salla.onReady().then(async () => {
|
|
678
862
|
this.hasCustomComponent = !!customElements.get(this.productCardComponent);
|
|
679
863
|
this.sourceValueIsValid = !!(this.getSourceValue() || this.isSourceWithoutValue());
|
|
680
864
|
this.hasInfiniteScroll = !this.isAuxiliaryProductsListSource() && !this.limit;
|
|
@@ -754,15 +938,16 @@ const SallaProductsList = class {
|
|
|
754
938
|
});
|
|
755
939
|
}
|
|
756
940
|
else {
|
|
757
|
-
console.error(
|
|
941
|
+
console.error('No response received after getInitialData.');
|
|
758
942
|
}
|
|
759
943
|
})
|
|
760
944
|
.catch(error => {
|
|
761
|
-
console.error(
|
|
945
|
+
console.error('Error during initial data fetch:', error);
|
|
762
946
|
});
|
|
763
947
|
}
|
|
764
948
|
else {
|
|
765
|
-
this.firstPageResponse &&
|
|
949
|
+
this.firstPageResponse &&
|
|
950
|
+
(await this.handleResponse(this.firstPageResponse, false)).forEach(card => this.wrapper.append(card));
|
|
766
951
|
}
|
|
767
952
|
}
|
|
768
953
|
canRender() {
|
|
@@ -773,16 +958,18 @@ const SallaProductsList = class {
|
|
|
773
958
|
return '';
|
|
774
959
|
}
|
|
775
960
|
if (this.showPlaceholder) {
|
|
776
|
-
return index.h("div", { class: "s-products-list-placeholder" }, index.h("span", { innerHTML: shoppingBag.ShoppingBag }), index.h("p", null, this.placeholderText));
|
|
961
|
+
return (index.h("div", { class: "s-products-list-placeholder" }, index.h("span", { innerHTML: shoppingBag.ShoppingBag }), index.h("p", null, this.placeholderText)));
|
|
777
962
|
}
|
|
778
963
|
return (index.h(index.Host, { class: "s-products-list" }, index.h("div", { class: {
|
|
779
|
-
|
|
964
|
+
's-products-list-wrapper': true,
|
|
780
965
|
's-products-list-horizontal-cards': this.horizontalCards && !this.filtersResults,
|
|
781
966
|
's-products-list-vertical-cards': !this.horizontalCards && !this.rowCards && !this.filtersResults,
|
|
782
967
|
's-products-list-row-cards': this.rowCards,
|
|
783
968
|
's-products-list-compact-cards': this.compactCards,
|
|
784
969
|
's-products-list-filters-results': this.filtersResults,
|
|
785
|
-
}, ref: wrapper => this.wrapper = wrapper }), index.h("div", { class: "s-infinite-scroll-status", ref: status => this.status = status }, index.h("p", { class: "s-infinite-scroll-last infinite-scroll-last s-hidden" }, this.endOfText), index.h("p", { class: "s-infinite-scroll-error infinite-scroll-error s-hidden" }, this.failedLoadMore)), this.autoload && index.h("div", { class: "s-products-list-loading-wrapper", style: {
|
|
970
|
+
}, ref: wrapper => (this.wrapper = wrapper) }), index.h("div", { class: "s-infinite-scroll-status", ref: status => (this.status = status) }, index.h("p", { class: "s-infinite-scroll-last infinite-scroll-last s-hidden" }, this.endOfText), index.h("p", { class: "s-infinite-scroll-error infinite-scroll-error s-hidden" }, this.failedLoadMore)), this.autoload && (index.h("div", { class: "s-products-list-loading-wrapper", style: { display: 'none' }, ref: loader => (this.loader = loader) }, index.h("span", { class: "s-button-loader s-button-loader-center s-infinite-scroll-btn-loader" }))), this.hasInfiniteScroll && this.nextPage && !this.autoload ? (index.h("div", { class: "s-infinite-scroll-wrapper", style: { display: 'none' }, ref: loadMoreWrapper => (this.loadMoreWrapper = loadMoreWrapper) }, index.h("button", { onClick: () => this.loadMore(), class: "s-infinite-scroll-btn s-button-btn s-button-primary" }, index.h("span", { class: "s-button-text s-infinite-scroll-btn-text" }, this.loadMoreText
|
|
971
|
+
? this.loadMoreText
|
|
972
|
+
: salla.lang.get('common.elements.load_more')), index.h("span", { class: "s-button-loader s-button-loader-center s-infinite-scroll-btn-loader", ref: btnLoader => (this.btnLoader = btnLoader), style: { display: 'none' } })))) : ('')));
|
|
786
973
|
}
|
|
787
974
|
init() {
|
|
788
975
|
this.initiateInfiniteScroll();
|
|
@@ -799,14 +986,19 @@ const SallaProductsList = class {
|
|
|
799
986
|
let title = Helper.Helper.getPageTitleForSource(source);
|
|
800
987
|
try {
|
|
801
988
|
if (this.getSource() === 'search') {
|
|
802
|
-
title = salla.lang.get('common.elements.search_about', {
|
|
989
|
+
title = salla.lang.get('common.elements.search_about', { word: this.getSourceValue() });
|
|
803
990
|
}
|
|
804
991
|
else if (!title) {
|
|
805
992
|
let catId = this.parsedFilters.category_id || this.getSourceValue()[0];
|
|
806
993
|
// get the first filter that its key is category_id, then get the value when filter.value.*.key==catId
|
|
807
|
-
title =
|
|
994
|
+
title =
|
|
995
|
+
response.filters
|
|
996
|
+
?.find(filter => filter.key === 'category_id')
|
|
997
|
+
?.values?.find(cat => cat.key === catId)?.value ?? '';
|
|
808
998
|
}
|
|
809
|
-
title +=
|
|
999
|
+
title +=
|
|
1000
|
+
(title ? ' - ' : '') +
|
|
1001
|
+
salla.lang.choice('blocks.header.products_count', response.data?.length);
|
|
810
1002
|
if (response.data.length === 15) {
|
|
811
1003
|
title = title.replace(response.data.length, salla.lang.get('common.elements.more_than') + ' ' + response.data.length);
|
|
812
1004
|
}
|
|
@@ -845,6 +1037,9 @@ const SallaProductsList = class {
|
|
|
845
1037
|
return productCardsView;
|
|
846
1038
|
}
|
|
847
1039
|
get host() { return index.getElement(this); }
|
|
1040
|
+
static get watchers() { return {
|
|
1041
|
+
"selectable": ["onSelectableChanged"]
|
|
1042
|
+
}; }
|
|
848
1043
|
};
|
|
849
1044
|
SallaProductsList.style = sallaProductsListCss;
|
|
850
1045
|
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-CXr_39D8.js');
|
|
7
7
|
var iphoneX = require('./iphone-x-qC21wCLj.js');
|
|
8
|
-
var mail = require('./mail-
|
|
8
|
+
var mail = require('./mail-C9D8MHae.js');
|
|
9
9
|
var cancel = require('./cancel-B5SbMYEk.js');
|
|
10
10
|
|
|
11
11
|
var CelebrationIcon = `<!-- Generated by IcoMoon.io -->
|
|
@@ -212,7 +212,7 @@ const SallaQuickOrder = class {
|
|
|
212
212
|
? this.confirmPayButtonTitle : this.expanded ? index.h("i", { innerHTML: cancel.SICancel }) : this.confirmPayButtonTitle)), index.h("form", { onSubmit: (e) => this.submit(e), class: 's-quick-order-expandable ' + (this.expanded ? 's-quick-order-shown' : '') }, Salla.config.isGuest() &&
|
|
213
213
|
[
|
|
214
214
|
index.h("div", { class: "s-form-group" }, index.h("span", { innerHTML: PortraitIcon }), index.h("input", { type: "text", required: true, class: "s-form-control s-quick-order-phone-field", name: 'name', placeholder: this.userNameLabel, ref: el => (this.nameInput = el) })),
|
|
215
|
-
index.h("div", { class: "s-quick-order-flex-input" }, index.h("div", { class: "s-form-group" }, index.h("span", { innerHTML: iphoneX.SIiPhoneX }), index.h("salla-tel-input", { ref: el => (this.phoneInput = el) })), index.h("div", { class: "s-form-group" }, index.h("span", { innerHTML: mail.
|
|
215
|
+
index.h("div", { class: "s-quick-order-flex-input" }, index.h("div", { class: "s-form-group" }, index.h("span", { innerHTML: iphoneX.SIiPhoneX }), index.h("salla-tel-input", { ref: el => (this.phoneInput = el) })), index.h("div", { class: "s-form-group" }, index.h("span", { innerHTML: mail.email }), index.h("input", { type: "email", class: "s-form-control s-quick-order-email-field", name: 'email', required: this.isEmailRequired, placeholder: this.placeHolderEmail + ' ' + (this.isEmailRequired ? '' : this.emailOptional), ref: el => (this.emailInput = el) }))),
|
|
216
216
|
], this.isTermsRequired && (index.h("label", { htmlFor: "terms", class: "s-quick-order-terms" }, index.h("input", { type: "checkbox", required: true, name: 'terms', id: 'terms', ref: el => (this.termsInput = el), onChange: () => (this.termsChecked = this.termsInput.checked), class: "s-checkbox" }), index.h("span", { class: "s-form-label" }, " ", index.h("div", { innerHTML: this.formatAgreementText(this.agreementText, 150) }, this.agreementText.length > 150 && (index.h("salla-button", { shape: "link", onClick: () => this.agreementModal.open() }, this.agreementShowText))), " "))), index.h("salla-button", { type: "submit", color: this.getBtnColor(), width: "wide", ref: el => (this.submitBtn = el) }, this.payButtonTitle)), index.h("salla-modal", { "modal-title": this.agreementModalHead, ref: modal => (this.agreementModal = modal) }, index.h("article", { innerHTML: this.agreementText })))));
|
|
217
217
|
}
|
|
218
218
|
componentDidLoad() {
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-CXr_39D8.js');
|
|
7
7
|
var star = require('./star-DGcH7Yso.js');
|
|
8
8
|
var checkCircle2 = require('./check-circle2-BDvlT4_n.js');
|
|
9
9
|
var Helper = require('./Helper-CgGR9Qf8.js');
|
|
10
10
|
var image = require('./image-BoZ6Hums.js');
|
|
11
11
|
var whatsapp2 = require('./whatsapp2-BdMd5Gx1.js');
|
|
12
|
-
var mail = require('./mail-
|
|
12
|
+
var mail = require('./mail-C9D8MHae.js');
|
|
13
13
|
var anime_es = require('./anime.es-BqW8JHZi.js');
|
|
14
14
|
|
|
15
15
|
var ShippingFast = `<!-- Generated by IcoMoon.io -->
|
|
@@ -436,7 +436,7 @@ const SallaRatingModal = class {
|
|
|
436
436
|
? index.h("div", { class: "rating-outer-form s-rating-modal-step-wrap s-rating-modal-step s-rating-modal-hidden", "data-type": "shipping" }, index.h("input", { type: "hidden", name: "shipping_company_id", value: this.order.shipping.company.id }), this.order.shipping.company.logo
|
|
437
437
|
? index.h("div", { class: "s-rating-modal-rounded-icon" }, index.h("img", { src: this.order.shipping.company.logo, class: "s-rating-modal-shipping-logo", alt: this.order.shipping.company.name }))
|
|
438
438
|
: index.h("span", { class: "s-rating-modal-icon", innerHTML: ShippingFast }), index.h("div", { class: "s-rating-modal-title" }, " ", `${salla.lang.get('pages.rating.rate_shipping')} ${this.order.shipping.company.name}`), index.h("div", { class: "s-rating-modal-stars-company" }, index.h("salla-rating-stars", { withLabel: true, size: "large" })), index.h("textarea", { name: "comment", class: "s-rating-modal-comment", placeholder: salla.lang.get('pages.rating.write_shipping_rate') }), index.h("small", { class: "s-rating-modal-validation-msg" }))
|
|
439
|
-
: '', index.h("div", { class: "s-rating-modal-thanks s-rating-modal-hidden", ref: el => this.thanksTab = el }, index.h("span", { class: "s-rating-modal-icon", innerHTML: checkCircle2.CheckCircle2 }), index.h("h3", { class: "s-rating-modal-thanks-title" }, salla.lang.get('pages.rating.thanks')), index.h("div", { class: "s-rating-modal-thanks-msg", innerHTML: this.order.thanks_message }), index.h("time", { class: "s-rating-modal-thanks-time", ref: el => this.thanksTime = el }))), this.allowContactSupport && this.showContactWidget && (salla.config.get('store.contacts.whatsapp') || salla.config.get('store.contacts.email')) ? index.h("div", { class: "s-rating-modal-contact" }, index.h("p", null, this.contactUsLabel), index.h("div", { class: "s-rating-modal-contact-icons" }, salla.config.get('store.contacts.whatsapp') && index.h("span", { onClick: () => this.handleSendWhatsApp(), innerHTML: whatsapp2.WhatsappIcon }), salla.config.get('store.contacts.email') && index.h("span", { onClick: () => this.handleSendEmail(), innerHTML: mail.
|
|
439
|
+
: '', index.h("div", { class: "s-rating-modal-thanks s-rating-modal-hidden", ref: el => this.thanksTab = el }, index.h("span", { class: "s-rating-modal-icon", innerHTML: checkCircle2.CheckCircle2 }), index.h("h3", { class: "s-rating-modal-thanks-title" }, salla.lang.get('pages.rating.thanks')), index.h("div", { class: "s-rating-modal-thanks-msg", innerHTML: this.order.thanks_message }), index.h("time", { class: "s-rating-modal-thanks-time", ref: el => this.thanksTime = el }))), this.allowContactSupport && this.showContactWidget && (salla.config.get('store.contacts.whatsapp') || salla.config.get('store.contacts.email')) ? index.h("div", { class: "s-rating-modal-contact" }, index.h("p", null, this.contactUsLabel), index.h("div", { class: "s-rating-modal-contact-icons" }, salla.config.get('store.contacts.whatsapp') && index.h("span", { onClick: () => this.handleSendWhatsApp(), innerHTML: whatsapp2.WhatsappIcon }), salla.config.get('store.contacts.email') && index.h("span", { onClick: () => this.handleSendEmail(), innerHTML: mail.email }))) : '', index.h("div", { class: "s-rating-modal-footer" }, index.h("button", { ref: el => this.backBtn = el, onClick: () => this.previousTab(), class: "s-rating-modal-btn s-rating-modal-unvisiable" }, salla.lang.get('common.elements.back')), this.stepsCount > 1 ? index.h("ul", { class: "s-rating-modal-dots" }, [0, 1, 2].slice(0, this.stepsCount).map((v) => index.h("li", { key: v, class: 's-rating-modal-bg-gray s-rating-modal-step-dot' }))) : '', index.h("salla-button", { "loader-position": 'center', ref: el => this.nextBtn = el, onClick: () => this.submit() }, salla.lang.get('common.elements.next')))]
|
|
440
440
|
: index.h("salla-placeholder", { alignment: "center" }))));
|
|
441
441
|
}
|
|
442
442
|
}
|