@salla.sa/twilight-components 2.14.594 → 2.14.596
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-DtGoIKEP.js → filepond-MMeFYRaC.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-DMejMF1-.js → filepond-plugin-file-poster-Dd1aobB-.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-J_fE6OBS.js → filepond-plugin-file-validate-size-Be46s5wp.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-BpewyAzF.js → filepond-plugin-file-validate-type-Cf3OjTHE.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-DPNUTWCK.js → filepond-plugin-image-edit-BDX5qgng.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-CZ6YRu70.js → filepond-plugin-image-exif-orientation-ilZNc8J4.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-CgV-oWXK.js → filepond-plugin-image-preview-C9c7tVEB.js} +1 -1
- package/dist/cjs/{index-BziKkkwT.js → index-zv0p1Eys.js} +2 -2
- package/dist/cjs/{intlTelInput-BLuZALMt.js → intlTelInput-C8hiSJ_i.js} +1 -1
- package/dist/cjs/loader.cjs.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 +1 -1
- 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-applied-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-attachment-view_9.cjs.entry.js +41 -16
- package/dist/cjs/salla-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
- package/dist/cjs/salla-bullet-delivery_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +68 -15
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-summary-card.cjs.entry.js +29 -4
- package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_9.cjs.entry.js +24 -3
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- 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-gift-card-redeem_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
- 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.cjs.entry.js +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-map_3.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_2.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-cancel.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-options-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-shipments.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.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 +1 -1
- package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search-product-card.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-social-share.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-summary.cjs.entry.js +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-36O-wrIX.js → vanilla-picker-DRrOfZz0.js} +1 -1
- package/dist/collection/components/salla-cart-coupons/salla-cart-coupons.js +69 -15
- package/dist/collection/components/salla-cart-summary-card/salla-cart-summary-card.js +30 -3
- package/dist/collection/components/salla-comments/salla-comments.js +23 -2
- package/dist/collection/components/salla-file-upload/salla-file-upload.css +3 -0
- package/dist/collection/components/salla-file-upload/salla-file-upload.js +30 -5
- package/dist/components/index.js +2 -2
- package/dist/components/salla-cart-coupons.js +68 -14
- package/dist/components/salla-cart-summary-card.js +30 -3
- package/dist/components/salla-comments.js +23 -2
- package/dist/components/salla-file-upload2.js +31 -6
- package/dist/docs.json +1 -1
- package/dist/esm/{filepond-DZJO0NDO.js → filepond-okemUEVJ.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-BGjhc2cd.js → filepond-plugin-file-poster-He-1QDcm.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-s9w1K7Bl.js → filepond-plugin-file-validate-size-BoQ9OZHK.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-OfI6GFgP.js → filepond-plugin-file-validate-type-BVxE-7xU.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-Cfselyr4.js → filepond-plugin-image-edit-DJnNmArQ.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-ConUo4eP.js → filepond-plugin-image-exif-orientation-CgkqV9g5.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-BJ4T10Ty.js → filepond-plugin-image-preview-DxbixTNR.js} +1 -1
- package/dist/esm/{index-Bxge4xib.js → index-C1mBhG6Z.js} +2 -2
- package/dist/esm/{intlTelInput-B-IoM3ox.js → intlTelInput-wxpsRy0u.js} +1 -1
- package/dist/esm/loader.js +3 -3
- 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 +1 -1
- 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-applied-filters.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-attachment-view_9.entry.js +41 -16
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-basket-gap.entry.js +1 -1
- package/dist/esm/salla-bullet-delivery_3.entry.js +1 -1
- package/dist/esm/salla-cart-coupons.entry.js +68 -15
- package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
- package/dist/esm/salla-cart-summary-card.entry.js +29 -4
- package/dist/esm/salla-cashback-banner.entry.js +1 -1
- package/dist/esm/salla-comment-factors.entry.js +1 -1
- package/dist/esm/salla-comment-form_9.entry.js +24 -3
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- 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-gift-card-redeem_2.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
- package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
- 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.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-map_3.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_2.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-cancel.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-options-modal.entry.js +1 -1
- package/dist/esm/salla-order-shipments.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.entry.js +1 -1
- package/dist/esm/salla-product-size-guide.entry.js +1 -1
- package/dist/esm/salla-products-list.entry.js +1 -1
- package/dist/esm/salla-products-slider.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +1 -1
- package/dist/esm/salla-review-factors-tags.entry.js +1 -1
- package/dist/esm/salla-review-order-item.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search-product-card.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-social-share.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tab-content_3.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/salla-wishlist-actions.entry.js +1 -1
- package/dist/esm/salla-wishlist-summary.entry.js +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-D1RSTlum.js → vanilla-picker-CQEJbE9K.js} +1 -1
- package/dist/twilight/{p-6d3d5a0b.entry.js → p-020eb2a1.entry.js} +1 -1
- package/dist/twilight/p-06799084.entry.js +4 -0
- package/dist/twilight/{p-b3213fee.entry.js → p-0a3abfd4.entry.js} +1 -1
- package/dist/twilight/{p-79bb0c41.entry.js → p-0ef388be.entry.js} +1 -1
- package/dist/twilight/{p-6bfcdb38.entry.js → p-1080831a.entry.js} +1 -1
- package/dist/twilight/{p-c0274022.entry.js → p-12a2b743.entry.js} +1 -1
- package/dist/twilight/{p-7ed0db2e.entry.js → p-160476f0.entry.js} +1 -1
- package/dist/twilight/{p-aa96807e.entry.js → p-1a5d0b25.entry.js} +1 -1
- package/dist/twilight/{p-6e42d70f.entry.js → p-1f99db23.entry.js} +1 -1
- package/dist/twilight/{p-3162901e.entry.js → p-21ba0eac.entry.js} +1 -1
- package/dist/twilight/{p-e7e52491.entry.js → p-232c39e9.entry.js} +1 -1
- package/dist/twilight/{p-fae38591.entry.js → p-305ed224.entry.js} +1 -1
- package/dist/twilight/{p-0e1a454b.entry.js → p-342b31ba.entry.js} +1 -1
- package/dist/twilight/{p-530b513d.entry.js → p-3a465851.entry.js} +1 -1
- package/dist/twilight/{p-a912d6a3.entry.js → p-3a4cf66c.entry.js} +1 -1
- package/dist/twilight/{p-35c0ca9a.entry.js → p-3c4702bb.entry.js} +1 -1
- package/dist/twilight/{p-a3a69984.entry.js → p-3dcb5129.entry.js} +1 -1
- package/dist/twilight/{p-e1b0dafc.entry.js → p-43d0c80e.entry.js} +1 -1
- package/dist/twilight/{p-b1dc78db.entry.js → p-474997dd.entry.js} +1 -1
- package/dist/twilight/{p-4543b3b3.entry.js → p-4b0eaa16.entry.js} +1 -1
- package/dist/twilight/{p-9f0459ec.entry.js → p-4bde9c4e.entry.js} +1 -1
- package/dist/twilight/{p-35bc566f.entry.js → p-50bbbd18.entry.js} +1 -1
- package/dist/twilight/{p-57097563.entry.js → p-51c26ce7.entry.js} +1 -1
- package/dist/twilight/{p-c4bf8d24.entry.js → p-54054ab9.entry.js} +1 -1
- package/dist/twilight/{p-f22ec479.entry.js → p-54bc613c.entry.js} +1 -1
- package/dist/twilight/{p-52012794.entry.js → p-58058ae9.entry.js} +1 -1
- package/dist/twilight/{p-c476eaab.entry.js → p-5babb989.entry.js} +1 -1
- package/dist/twilight/{p-abfbba72.entry.js → p-5c1a36ab.entry.js} +1 -1
- package/dist/twilight/{p-0d464350.entry.js → p-5cf3929c.entry.js} +1 -1
- package/dist/twilight/{p-2e5bace8.entry.js → p-5e099f96.entry.js} +1 -1
- package/dist/twilight/{p-5b3a04cd.entry.js → p-5e426c78.entry.js} +1 -1
- package/dist/twilight/{p-d9188e76.entry.js → p-60d06105.entry.js} +1 -1
- package/dist/twilight/{p-fd615606.entry.js → p-62653d93.entry.js} +1 -1
- package/dist/twilight/{p-34454493.entry.js → p-6602a61a.entry.js} +1 -1
- package/dist/twilight/{p-bff2400f.entry.js → p-672a709e.entry.js} +1 -1
- package/dist/twilight/{p-988f6193.entry.js → p-67d3ee58.entry.js} +1 -1
- package/dist/twilight/{p-2c8b8935.entry.js → p-7ac91ace.entry.js} +1 -1
- package/dist/twilight/{p-751ff32d.entry.js → p-8028be6f.entry.js} +1 -1
- package/dist/twilight/{p-572a1f84.entry.js → p-80699771.entry.js} +1 -1
- package/dist/twilight/{p-22f21c95.entry.js → p-81596b48.entry.js} +1 -1
- package/dist/twilight/{p-4362756f.entry.js → p-82939afe.entry.js} +1 -1
- package/dist/twilight/{p-6b90f160.entry.js → p-844176cb.entry.js} +1 -1
- package/dist/twilight/{p-1769ead6.entry.js → p-8513fec2.entry.js} +1 -1
- package/dist/twilight/{p-94e85b3c.entry.js → p-85cff524.entry.js} +1 -1
- package/dist/twilight/{p-b8661b67.entry.js → p-8bdb7f71.entry.js} +1 -1
- package/dist/twilight/{p-51e8c2b2.entry.js → p-8dfdd6c9.entry.js} +1 -1
- package/dist/twilight/{p-b6918b2b.entry.js → p-8eb75cf8.entry.js} +1 -1
- package/dist/twilight/{p-d38b5aaa.entry.js → p-8ec0fc03.entry.js} +1 -1
- package/dist/twilight/{p-f4c94e30.entry.js → p-92f6aa52.entry.js} +1 -1
- package/dist/twilight/{p-d1e4e15e.entry.js → p-97bb12a6.entry.js} +1 -1
- package/dist/twilight/{p-00cb1c25.entry.js → p-9d434410.entry.js} +1 -1
- package/dist/twilight/{p-B5twlAuI.js → p-BB23a2fo.js} +1 -1
- package/dist/twilight/{p-DnoH14HK.js → p-Bm1ywp6t.js} +1 -1
- package/dist/twilight/{p-Bxge4xib.js → p-C1mBhG6Z.js} +1 -1
- package/dist/twilight/{p-DKEu8h4M.js → p-C57CqqgQ.js} +1 -1
- package/dist/twilight/{p-BkWctmFE.js → p-CJPWrlxL.js} +1 -1
- package/dist/twilight/{p-EiLe0Yi_.js → p-CtcjG32v.js} +1 -1
- package/dist/twilight/{p-CWLJmpv-.js → p-DiU9tYvl.js} +1 -1
- package/dist/twilight/{p-W-AkIawg.js → p-E2n9kJc8.js} +1 -1
- package/dist/twilight/{p-CINox5XU.js → p-Gxv67UlH.js} +1 -1
- package/dist/twilight/{p-59256d82.entry.js → p-a11b77df.entry.js} +1 -1
- package/dist/twilight/{p-106ea7ed.entry.js → p-a4aac112.entry.js} +1 -1
- package/dist/twilight/{p-1b56374e.entry.js → p-a52bfa57.entry.js} +1 -1
- package/dist/twilight/{p-fd6fc043.entry.js → p-a9aadc0b.entry.js} +1 -1
- package/dist/twilight/{p-fb119c27.entry.js → p-ac20a6de.entry.js} +1 -1
- package/dist/twilight/{p-b2322278.entry.js → p-b3abf071.entry.js} +1 -1
- package/dist/twilight/{p-0bbd0d06.entry.js → p-bc26490f.entry.js} +1 -1
- package/dist/twilight/{p-c903b6bb.entry.js → p-bef93c52.entry.js} +1 -1
- package/dist/twilight/{p-125482ce.entry.js → p-c28395c6.entry.js} +1 -1
- package/dist/twilight/{p-15824030.entry.js → p-c28c53c3.entry.js} +1 -1
- package/dist/twilight/p-c30bfc0b.entry.js +4 -0
- package/dist/twilight/p-c82f46a9.entry.js +4 -0
- package/dist/twilight/{p-2510973e.entry.js → p-c89282b0.entry.js} +1 -1
- package/dist/twilight/{p-be3f6dbe.entry.js → p-ca7593c0.entry.js} +1 -1
- package/dist/twilight/{p-78963d5d.entry.js → p-caee5b0d.entry.js} +1 -1
- package/dist/twilight/{p-aafa69d6.entry.js → p-cb770a9e.entry.js} +1 -1
- package/dist/twilight/{p-db53740d.entry.js → p-cbcca1ff.entry.js} +1 -1
- package/dist/twilight/p-d6508494.entry.js +4 -0
- package/dist/twilight/{p-30b7383a.entry.js → p-d6d72996.entry.js} +1 -1
- package/dist/twilight/{p-2ef59b30.entry.js → p-d75157e0.entry.js} +1 -1
- package/dist/twilight/{p-64c76ad9.entry.js → p-d81bcfb3.entry.js} +1 -1
- package/dist/twilight/{p-e19a980b.entry.js → p-da9bd7f6.entry.js} +1 -1
- package/dist/twilight/{p-42162de9.entry.js → p-dbc1e40c.entry.js} +1 -1
- package/dist/twilight/{p-790ea507.entry.js → p-dcb5ceda.entry.js} +1 -1
- package/dist/twilight/{p-94970458.entry.js → p-de55326d.entry.js} +1 -1
- package/dist/twilight/{p-51243641.entry.js → p-e00ed6c9.entry.js} +1 -1
- package/dist/twilight/{p-d2e929bd.entry.js → p-e43c49e9.entry.js} +1 -1
- package/dist/twilight/{p-614b7b61.entry.js → p-e4589779.entry.js} +1 -1
- package/dist/twilight/{p-ebbb25fc.entry.js → p-e67b2aa8.entry.js} +1 -1
- package/dist/twilight/{p-09e56514.entry.js → p-e98835e3.entry.js} +1 -1
- package/dist/twilight/{p-66131771.entry.js → p-e9ce8dec.entry.js} +1 -1
- package/dist/twilight/{p-c16b9f4a.entry.js → p-eb718f6b.entry.js} +1 -1
- package/dist/twilight/{p-6e57ff9f.entry.js → p-ec361a66.entry.js} +1 -1
- package/dist/twilight/{p-1d551b52.entry.js → p-f130c67f.entry.js} +1 -1
- package/dist/twilight/{p-a37bc663.entry.js → p-f32de457.entry.js} +1 -1
- package/dist/twilight/{p-30f24d97.entry.js → p-f3985cfd.entry.js} +1 -1
- package/dist/twilight/{p-4cedf139.entry.js → p-f47a1351.entry.js} +1 -1
- package/dist/twilight/{p-4457a289.entry.js → p-f626ef96.entry.js} +1 -1
- package/dist/twilight/{p-2c2f0608.entry.js → p-f643bf2f.entry.js} +1 -1
- package/dist/twilight/{p-f046edd3.entry.js → p-f6df7f8a.entry.js} +1 -1
- package/dist/twilight/{p-df407f01.entry.js → p-f8aa1b23.entry.js} +1 -1
- package/dist/twilight/{p-3e02b792.entry.js → p-fac4da2b.entry.js} +1 -1
- package/dist/twilight/{p-d6d7c6a1.entry.js → p-fd3bb3f2.entry.js} +1 -1
- package/dist/twilight/{p-21d1a687.entry.js → p-fd787b30.entry.js} +1 -1
- package/dist/twilight/{p-BXAODWDa.js → p-pzi0Osm7.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-cart-coupons/salla-cart-coupons.d.ts +14 -0
- package/dist/types/components/salla-cart-summary-card/salla-cart-summary-card.d.ts +3 -0
- package/dist/types/components/salla-comments/salla-comments.d.ts +3 -0
- package/dist/types/components/salla-file-upload/salla-file-upload.d.ts +1 -0
- package/package.json +5 -5
- package/dist/twilight/p-0835d9ab.entry.js +0 -4
- package/dist/twilight/p-84308a79.entry.js +0 -4
- package/dist/twilight/p-8c229520.entry.js +0 -4
- package/dist/twilight/p-df313b00.entry.js +0 -4
|
@@ -47,12 +47,23 @@ export class SallaCartCoupons {
|
|
|
47
47
|
// - Single-coupon (flag off): any payload carrying `coupon` re-syncs the input, so a
|
|
48
48
|
// server-side invalidation (e.g. cart drops below the coupon minimum) that emits
|
|
49
49
|
// `coupon: ''` clears the stale code instead of leaving it stuck until a reload.
|
|
50
|
+
// A null `coupon` is dropped from the payload, so a cart holding only a cashback
|
|
51
|
+
// activation code carries `cashback_code` alone — accept that too.
|
|
50
52
|
const carriesCoupons = this.multiCoupon
|
|
51
53
|
? Array.isArray(cartData?.coupons)
|
|
52
|
-
: (cartData && 'coupon' in cartData);
|
|
54
|
+
: (cartData && ('coupon' in cartData || 'cashback_code' in cartData));
|
|
53
55
|
if (carriesCoupons) {
|
|
54
56
|
this.syncAppliedFromCart(cartData);
|
|
55
57
|
}
|
|
58
|
+
else if (this.multiCoupon && cartData && 'cashback_code' in cartData) {
|
|
59
|
+
// Multi-coupon had a blind spot: a cart whose only code is a cashback activation code
|
|
60
|
+
// has no `coupons` array to carry (forApi drops a null `coupon`), so the chip never
|
|
61
|
+
// appeared on a cart::updated that wasn't itself an add/remove. It cannot go through
|
|
62
|
+
// syncAppliedFromCart though — that RE-SEEDS from the payload, and a summary-only
|
|
63
|
+
// update would then drop every stacked coupon, which is exactly what the guard above
|
|
64
|
+
// exists to prevent. So merge the one chip instead of rebuilding the list.
|
|
65
|
+
this.mergeCashbackCodeChip(cartData.cashback_code);
|
|
66
|
+
}
|
|
56
67
|
// Clear error when cart updates
|
|
57
68
|
this.couponError = '';
|
|
58
69
|
};
|
|
@@ -92,6 +103,24 @@ export class SallaCartCoupons {
|
|
|
92
103
|
this.onInput = (event) => {
|
|
93
104
|
this.couponInputValue = event.target.value;
|
|
94
105
|
};
|
|
106
|
+
/**
|
|
107
|
+
* Seed the chip list and the active coupon from a cart object.
|
|
108
|
+
* Multi-coupon: use the cart's `coupons` array (survives refresh).
|
|
109
|
+
* Single-coupon (default): use the single `coupon` code.
|
|
110
|
+
* A cashback activation code (`cashback_code`) is shown like an applied coupon; removing it
|
|
111
|
+
* goes through the same coupon delete calls, which clear it on the server.
|
|
112
|
+
*/
|
|
113
|
+
/**
|
|
114
|
+
* Add the cashback activation code to the existing chips without touching the rest.
|
|
115
|
+
*
|
|
116
|
+
* Additive only, on purpose: removal already flows through the explicit remove path, which
|
|
117
|
+
* refreshes from the server with a real `coupons` array. Inferring removal here is not
|
|
118
|
+
* possible anyway — nothing marks which chip is the cashback one — and guessing would risk
|
|
119
|
+
* deleting a real coupon.
|
|
120
|
+
*/
|
|
121
|
+
/** The cashback code this component merged into the chips, so a later update can replace
|
|
122
|
+
* or clear exactly that one without touching a real coupon. */
|
|
123
|
+
this.mergedCashbackCode = '';
|
|
95
124
|
}
|
|
96
125
|
async componentWillLoad() {
|
|
97
126
|
await Salla.onReady();
|
|
@@ -225,7 +254,7 @@ export class SallaCartCoupons {
|
|
|
225
254
|
// cart-details nests the cart under data.cart (same shape addCoupon/deleteCoupon read).
|
|
226
255
|
const cart = response?.data?.cart ?? response?.data ?? response;
|
|
227
256
|
if (cart && typeof cart === 'object' &&
|
|
228
|
-
(Array.isArray(cart.coupons) || 'coupon' in cart)) {
|
|
257
|
+
(Array.isArray(cart.coupons) || 'coupon' in cart || 'cashback_code' in cart)) {
|
|
229
258
|
this.applyCart(cart);
|
|
230
259
|
return;
|
|
231
260
|
}
|
|
@@ -244,17 +273,41 @@ export class SallaCartCoupons {
|
|
|
244
273
|
this.syncCartTotal(cart);
|
|
245
274
|
this.syncAppliedFromCart(cart);
|
|
246
275
|
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
276
|
+
mergeCashbackCodeChip(code) {
|
|
277
|
+
const next = (code || '').trim();
|
|
278
|
+
const prev = (this.mergedCashbackCode || '').trim();
|
|
279
|
+
if (next.toLowerCase() === prev.toLowerCase())
|
|
280
|
+
return;
|
|
281
|
+
// Drop the code WE merged last time before adding the new one. Purely additive
|
|
282
|
+
// merging left a stale chip behind whenever the code was replaced or cleared, so a
|
|
283
|
+
// shopper could see two cashback chips, or one for a code no longer on the cart.
|
|
284
|
+
// Only ever removes the tracked value — never a real coupon, which we have no way to
|
|
285
|
+
// distinguish otherwise. An ABSENT `cashback_code` key still means "no information",
|
|
286
|
+
// not "removed", and never reaches here.
|
|
287
|
+
const kept = prev
|
|
288
|
+
? this.appliedCoupons.filter(c => (c || '').toLowerCase() !== prev.toLowerCase())
|
|
289
|
+
: [...this.appliedCoupons];
|
|
290
|
+
const already = kept.some(c => (c || '').toLowerCase() === next.toLowerCase());
|
|
291
|
+
this.appliedCoupons = next && !already ? [...kept, next] : kept;
|
|
292
|
+
this.mergedCashbackCode = next;
|
|
293
|
+
if (prev && this.currentCoupon.toLowerCase() === prev.toLowerCase()) {
|
|
294
|
+
this.currentCoupon = next;
|
|
295
|
+
}
|
|
296
|
+
else if (next) {
|
|
297
|
+
this.currentCoupon = this.currentCoupon || next;
|
|
298
|
+
}
|
|
299
|
+
this.buildMergedCoupons();
|
|
300
|
+
}
|
|
252
301
|
syncAppliedFromCart(cart) {
|
|
253
|
-
this.currentCoupon = cart?.coupon || '';
|
|
302
|
+
this.currentCoupon = cart?.coupon || cart?.cashback_code || '';
|
|
303
|
+
// Keep the merge tracker in step with the rebuilt list. Without this the tracker went
|
|
304
|
+
// stale the moment a full payload rebuilt appliedCoupons, so the NEXT cashback-only
|
|
305
|
+
// update compared against a value no longer on the cart — leaving the old chip,
|
|
306
|
+
// appending a replacement beside it, or skipping a valid code.
|
|
307
|
+
this.mergedCashbackCode = (cart?.cashback_code || '').trim();
|
|
254
308
|
if (this.multiCoupon) {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
: (this.currentCoupon ? [this.currentCoupon] : []);
|
|
309
|
+
const coupons = Array.isArray(cart?.coupons) ? cart.coupons : [cart?.coupon];
|
|
310
|
+
this.appliedCoupons = [...coupons, cart?.cashback_code].filter(Boolean);
|
|
258
311
|
// The payload sends `applied_coupons` keyed BY CODE, which is the useful shape for a
|
|
259
312
|
// lookup; a plain list is accepted too so neither side depends on the other's choice.
|
|
260
313
|
const cards = cart?.applied_coupons;
|
|
@@ -568,7 +621,7 @@ export class SallaCartCoupons {
|
|
|
568
621
|
}
|
|
569
622
|
render() {
|
|
570
623
|
const couponRow = this.couponRow();
|
|
571
|
-
return (h(Host, { key: '
|
|
624
|
+
return (h(Host, { key: '79d820f5931ca33571e6897f4e5a09413e02cf96' }, h("div", { key: '7c55aa93e8f4bc44c76606e1af4cb593cab0e7b2', class: "s-cart-coupons-wrapper" }, h("div", { key: '7deee9dc280b91008c9f29eab2c7dbb42fb4d586', class: "s-cart-coupons-input-section" }, h("label", { key: 'f4362e77c3031c8bdacdbd0bd126f7df3c973583', htmlFor: "coupon-input", class: "s-cart-coupons-coupon-label" }, salla.lang.get('pages.cart.have_coupon')), h("div", { key: '631dce1aeb71c6bfc80d00869c0974ffedb3f932', class: "s-cart-coupons-coupon-input-container" }, this.multiCoupon ? [
|
|
572
625
|
// Multi-coupon: input stays active to append more codes; applied coupons render
|
|
573
626
|
// as removable chips below.
|
|
574
627
|
h("input", { type: "text", id: "coupon-input", name: "coupon", class: `form-input ${this.couponError ? 's-coupon-input-error' : ''}`, placeholder: salla.lang.get('pages.cart.coupon_placeholder'), value: this.couponInputValue, disabled: this.isApplying, onInput: this.onInput, onKeyUp: this.onKeyUp, "aria-label": salla.lang.get('pages.cart.apply_coupon'), key: "coupon-input" }),
|
|
@@ -579,7 +632,7 @@ export class SallaCartCoupons {
|
|
|
579
632
|
// a new code can only be entered after removing. Reuses the existing master classes.
|
|
580
633
|
h("input", { type: "text", id: "coupon-input", name: "coupon", class: `form-input ${this.couponError ? 's-coupon-input-error' : ''}`, placeholder: salla.lang.get('pages.cart.coupon_placeholder'), value: this.couponInputValue, disabled: !!this.currentCoupon || this.isApplying, onInput: this.onInput, onKeyUp: this.onKeyUp, "aria-label": salla.lang.get('pages.cart.apply_coupon'), key: "coupon-input" }),
|
|
581
634
|
h("salla-button", { ref: el => this.couponButtonRef = el, class: `s-cart-coupons-coupon-button ${this.currentCoupon ? 's-cart-coupons-coupon-button-remove' : 's-cart-coupons-coupon-button-apply'}`, color: this.currentCoupon ? 'danger' : 'primary', loading: this.isApplying, "loader-position": "center", onClick: () => this.handleCouponButtonClick(), key: "apply-button" }, this.currentCoupon ? (h("i", { class: "sicon-cancel" })) : (h("span", null, salla.lang.get('pages.cart.save_coupon')))),
|
|
582
|
-
]), this.couponError && (h("span", { key: '
|
|
635
|
+
]), this.couponError && (h("span", { key: '9713718d67c8c4ff4daeffc47572ac3cabea6905', class: "s-cart-coupons-coupon-error" }, this.couponError))), couponRow.length > 0 && (h("salla-slider", { type: "carousel", showControls: false, class: "s-cart-coupons-slider",
|
|
583
636
|
/* salla-slider hands its slot children to Swiper, which MOVES them out of the
|
|
584
637
|
`slot="items"` div into its own .swiper-wrapper. Stencil then patches against a
|
|
585
638
|
tree that no longer exists where it expects, so a slide added to a list that
|
|
@@ -588,7 +641,7 @@ export class SallaCartCoupons {
|
|
|
588
641
|
against dynamic custom components inside it. Keying on the exact code list
|
|
589
642
|
makes Stencil discard and remount the slider whenever the set changes, so
|
|
590
643
|
Swiper re-initialises over the full, correct set of slides. */
|
|
591
|
-
key: couponRow.map(entry => entry.code).join('|') }, h("div", { key: '
|
|
644
|
+
key: couponRow.map(entry => entry.code).join('|') }, h("div", { key: '4b96603ef79b45b312a87755850b3c81cc51deea', slot: "items" }, couponRow.map(entry => this.renderCouponCard(entry))))))));
|
|
592
645
|
}
|
|
593
646
|
static get is() { return "salla-cart-coupons"; }
|
|
594
647
|
static get originalStyleUrls() {
|
|
@@ -613,7 +666,8 @@ export class SallaCartCoupons {
|
|
|
613
666
|
"appliedCoupons": {},
|
|
614
667
|
"mergedCoupons": {},
|
|
615
668
|
"appliedCouponCards": {},
|
|
616
|
-
"multiCoupon": {}
|
|
669
|
+
"multiCoupon": {},
|
|
670
|
+
"mergedCashbackCode": {}
|
|
617
671
|
};
|
|
618
672
|
}
|
|
619
673
|
static get methods() {
|
|
@@ -17,6 +17,8 @@ export class SallaCartSummaryCard {
|
|
|
17
17
|
this.cartCount = 0;
|
|
18
18
|
this.cartTotal = 0;
|
|
19
19
|
this.cartTotalDiscount = 0;
|
|
20
|
+
/** Active cashback (automatic or code-unlocked) — folded into the savings badge alongside the coupon discount. */
|
|
21
|
+
this.cartCashbackAmount = 0;
|
|
20
22
|
this.cartSubTotal = 0;
|
|
21
23
|
this.cartOptionsTotal = 0;
|
|
22
24
|
this.cartShippingCost = 0;
|
|
@@ -128,6 +130,7 @@ export class SallaCartSummaryCard {
|
|
|
128
130
|
this.vatTaxLabel = salla.lang.get('pages.cart.VAT_tax_amount');
|
|
129
131
|
this.savedLabel = salla.lang.get('pages.cart.discount');
|
|
130
132
|
this.discountBadge = salla.lang.get('pages.cart.saved');
|
|
133
|
+
this.cashbackLabel = salla.lang.get('pages.checkout.cashback');
|
|
131
134
|
this.finalTotalLabel = salla.lang.get('pages.cart.final_total');
|
|
132
135
|
this.pricesTaxedLabel = salla.lang.get('pages.cart.prices_taxed');
|
|
133
136
|
this.completeOrderLabel = salla.lang.get('pages.cart.complete_order');
|
|
@@ -254,8 +257,10 @@ export class SallaCartSummaryCard {
|
|
|
254
257
|
// skeleton either way so the CTA always renders.
|
|
255
258
|
applyCachedSummary() {
|
|
256
259
|
const summary = salla.storage?.get?.('cart.summary');
|
|
260
|
+
// false: the cached summary never carries cashback_amount, so it must not retract a
|
|
261
|
+
// promise the live cart made. Events refresh the real figure.
|
|
257
262
|
if (summary && typeof summary === 'object')
|
|
258
|
-
this.applyCartData(summary);
|
|
263
|
+
this.applyCartData(summary, false);
|
|
259
264
|
this.isLoading = false;
|
|
260
265
|
}
|
|
261
266
|
extractCart(payload) {
|
|
@@ -267,7 +272,7 @@ export class SallaCartSummaryCard {
|
|
|
267
272
|
return payload.cart;
|
|
268
273
|
return payload;
|
|
269
274
|
}
|
|
270
|
-
applyCartData(data) {
|
|
275
|
+
applyCartData(data, cashbackAuthoritative) {
|
|
271
276
|
if (!data)
|
|
272
277
|
return;
|
|
273
278
|
// First real payload ends the skeleton.
|
|
@@ -280,6 +285,25 @@ export class SallaCartSummaryCard {
|
|
|
280
285
|
const discount = data.total_discount ?? data.discount;
|
|
281
286
|
if (discount !== undefined)
|
|
282
287
|
this.cartTotalDiscount = this.num(discount);
|
|
288
|
+
// cashback_amount is a PROMISE, not a measurement, so it needs different handling from
|
|
289
|
+
// its neighbours in both directions.
|
|
290
|
+
//
|
|
291
|
+
// It must be RETRACTABLE: the backend omits it exactly when it has no promise to make
|
|
292
|
+
// (totals unbound, or the offers lookup failing closed), so a cart that recomputed its
|
|
293
|
+
// totals and did not come back with a figure is no longer promising one. Carrying the old
|
|
294
|
+
// number forward would leave the badge advertising cashback the cart may no longer earn.
|
|
295
|
+
//
|
|
296
|
+
// But only a payload that actually recomputed the totals may retract it. Two sources
|
|
297
|
+
// legitimately lack the field and must NOT clear the badge: the cached SDK summary
|
|
298
|
+
// (applyCachedSummary, used when cart/details fails) never carries it, and a
|
|
299
|
+
// `cart::updated` event can arrive with metadata only. Hence the explicit override, and
|
|
300
|
+
// otherwise the sub_total+total probe — a full cart payload always carries both, a
|
|
301
|
+
// metadata-only one carries neither.
|
|
302
|
+
const recomputedTotals = cashbackAuthoritative ?? (data.sub_total !== undefined && data.total !== undefined);
|
|
303
|
+
if (data.cashback_amount !== undefined)
|
|
304
|
+
this.cartCashbackAmount = this.num(data.cashback_amount);
|
|
305
|
+
else if (recomputedTotals)
|
|
306
|
+
this.cartCashbackAmount = 0;
|
|
283
307
|
if (data.sub_total !== undefined)
|
|
284
308
|
this.cartSubTotal = this.num(data.sub_total);
|
|
285
309
|
if (data.options_total !== undefined)
|
|
@@ -348,6 +372,7 @@ export class SallaCartSummaryCard {
|
|
|
348
372
|
if (this.isLoading)
|
|
349
373
|
return this.renderSkeleton();
|
|
350
374
|
const showSavings = this.cartTotalDiscount > 0;
|
|
375
|
+
const showCashback = this.cartCashbackAmount > 0;
|
|
351
376
|
const subTotalLabel = this.cartTaxAmount ? this.itemsTotalNoTaxLabel : this.itemsTotalLabel;
|
|
352
377
|
// Inline transform so sheet motion doesn't depend on SCSS load order.
|
|
353
378
|
const sheetStyle = this.isDesktop
|
|
@@ -364,7 +389,7 @@ export class SallaCartSummaryCard {
|
|
|
364
389
|
} }, h("div", { class: {
|
|
365
390
|
's-cart-summary-card-sheet-wrap': true,
|
|
366
391
|
's-cart-summary-card-sheet-wrap--open': this.isOpen,
|
|
367
|
-
}, "aria-hidden": this.isOpen ? 'false' : 'true' }, h("div", { class: "s-cart-summary-card-sheet", style: sheetStyle }, h("header", { class: "s-cart-summary-card-sheet-header" }, h("h3", { class: "s-cart-summary-card-sheet-title" }, this.summaryLabel)), h("div", { class: "s-cart-summary-card-line" }, h("span", null, subTotalLabel), h("b", { innerHTML: this.money(this.cartSubTotal) })), this.cartOptionsTotal > 0 && (h("div", { class: "s-cart-summary-card-line" }, h("span", null, this.optionsTotalLabel), h("b", { innerHTML: this.money(this.cartOptionsTotal) }))), this.cartHasShipping && (h("div", { class: "s-cart-summary-card-line" }, h("span", null, this.shippingCostLabel), h("b", { innerHTML: this.money(this.cartShippingCost) }))), this.cartTaxAmount > 0 && (h("div", { class: "s-cart-summary-card-line" }, h("span", null, this.vatTaxLabel), h("b", { innerHTML: this.money(this.cartTaxAmount) }))), showSavings && (h("div", { class: "s-cart-summary-card-line s-cart-summary-card-line--discount" }, h("span", null, this.savedLabel), h("b", null, "\u2212 ", h("span", { innerHTML: this.money(this.cartTotalDiscount) })))))), h("div", { class: "s-cart-summary-card-bar" }, h("div", { class: "s-cart-summary-card-bar-label" }, h("div", { class: "s-cart-summary-card-bar-label-main" }, h("span", { class: "s-cart-summary-card-bar-label-text" }, this.finalTotalLabel), h("span", { class: "s-cart-summary-card-bar-count" }, this.getItemsLabel())), this.cartTaxAmount > 0 && (h("div", { class: "s-cart-summary-card-bar-label-sub" }, this.pricesTaxedLabel))), h("div", { class: "s-cart-summary-card-bar-totals" }, h("div", { class: "s-cart-summary-card-bar-totals-row" }, showSavings && (h("s", { class: "s-cart-summary-card-bar-original" }, salla.helpers.number(this.roundToCurrency(this.cartTotal + this.cartTotalDiscount)))), h("b", { class: "s-cart-summary-card-bar-total", innerHTML: this.money(this.cartTotal) }), !this.isDesktop && (h("button", { type: "button", class: "s-cart-summary-card-chevron", "aria-label": this.isOpen ? this.closeSummaryLabel : this.openSummaryLabel, "aria-expanded": this.isOpen ? 'true' : 'false', onClick: this.toggleSheet }, h("i", { class: "sicon-keyboard_arrow_up s-cart-summary-card-chevron-icon" })))), showSavings && (h("div", { class: "s-cart-summary-card-bar-savings-badge" }, h("span", { "aria-hidden": "true" }, "\uD83C\uDF89"), h("span", null, this.discountBadge, " ", h("span", { innerHTML: this.money(this.cartTotalDiscount) })))))), h("div", { class: "s-cart-summary-card-action" }, h("salla-button", { id: "s-cart-summary-card-submit", width: "wide", "loader-position": "center", onClick: this.handleSubmit }, this.completeOrderLabel))));
|
|
392
|
+
}, "aria-hidden": this.isOpen ? 'false' : 'true' }, h("div", { class: "s-cart-summary-card-sheet", style: sheetStyle }, h("header", { class: "s-cart-summary-card-sheet-header" }, h("h3", { class: "s-cart-summary-card-sheet-title" }, this.summaryLabel)), h("div", { class: "s-cart-summary-card-line" }, h("span", null, subTotalLabel), h("b", { innerHTML: this.money(this.cartSubTotal) })), this.cartOptionsTotal > 0 && (h("div", { class: "s-cart-summary-card-line" }, h("span", null, this.optionsTotalLabel), h("b", { innerHTML: this.money(this.cartOptionsTotal) }))), this.cartHasShipping && (h("div", { class: "s-cart-summary-card-line" }, h("span", null, this.shippingCostLabel), h("b", { innerHTML: this.money(this.cartShippingCost) }))), this.cartTaxAmount > 0 && (h("div", { class: "s-cart-summary-card-line" }, h("span", null, this.vatTaxLabel), h("b", { innerHTML: this.money(this.cartTaxAmount) }))), showSavings && (h("div", { class: "s-cart-summary-card-line s-cart-summary-card-line--discount" }, h("span", null, this.savedLabel), h("b", null, "\u2212 ", h("span", { innerHTML: this.money(this.cartTotalDiscount) })))))), h("div", { class: "s-cart-summary-card-bar" }, h("div", { class: "s-cart-summary-card-bar-label" }, h("div", { class: "s-cart-summary-card-bar-label-main" }, h("span", { class: "s-cart-summary-card-bar-label-text" }, this.finalTotalLabel), h("span", { class: "s-cart-summary-card-bar-count" }, this.getItemsLabel())), this.cartTaxAmount > 0 && (h("div", { class: "s-cart-summary-card-bar-label-sub" }, this.pricesTaxedLabel))), h("div", { class: "s-cart-summary-card-bar-totals" }, h("div", { class: "s-cart-summary-card-bar-totals-row" }, showSavings && (h("s", { class: "s-cart-summary-card-bar-original" }, salla.helpers.number(this.roundToCurrency(this.cartTotal + this.cartTotalDiscount)))), h("b", { class: "s-cart-summary-card-bar-total", innerHTML: this.money(this.cartTotal) }), !this.isDesktop && (h("button", { type: "button", class: "s-cart-summary-card-chevron", "aria-label": this.isOpen ? this.closeSummaryLabel : this.openSummaryLabel, "aria-expanded": this.isOpen ? 'true' : 'false', onClick: this.toggleSheet }, h("i", { class: "sicon-keyboard_arrow_up s-cart-summary-card-chevron-icon" })))), (showSavings || showCashback) && (h("div", { class: "s-cart-summary-card-bar-savings-badge" }, h("span", { "aria-hidden": "true" }, "\uD83C\uDF89"), h("span", null, showSavings && (h("span", null, this.discountBadge, " ", h("span", { innerHTML: this.money(this.cartTotalDiscount) }))), showSavings && showCashback && ' + ', showCashback && (h("span", null, h("span", { innerHTML: this.money(this.cartCashbackAmount) }), " ", this.cashbackLabel))))))), h("div", { class: "s-cart-summary-card-action" }, h("salla-button", { id: "s-cart-summary-card-submit", width: "wide", "loader-position": "center", onClick: this.handleSubmit }, this.completeOrderLabel))));
|
|
368
393
|
}
|
|
369
394
|
static get is() { return "salla-cart-summary-card"; }
|
|
370
395
|
static get originalStyleUrls() {
|
|
@@ -406,6 +431,7 @@ export class SallaCartSummaryCard {
|
|
|
406
431
|
"cartCount": {},
|
|
407
432
|
"cartTotal": {},
|
|
408
433
|
"cartTotalDiscount": {},
|
|
434
|
+
"cartCashbackAmount": {},
|
|
409
435
|
"cartSubTotal": {},
|
|
410
436
|
"cartOptionsTotal": {},
|
|
411
437
|
"cartShippingCost": {},
|
|
@@ -422,6 +448,7 @@ export class SallaCartSummaryCard {
|
|
|
422
448
|
"vatTaxLabel": {},
|
|
423
449
|
"savedLabel": {},
|
|
424
450
|
"discountBadge": {},
|
|
451
|
+
"cashbackLabel": {},
|
|
425
452
|
"finalTotalLabel": {},
|
|
426
453
|
"pricesTaxedLabel": {},
|
|
427
454
|
"completeOrderLabel": {},
|
|
@@ -25,6 +25,7 @@ export class SallaComments {
|
|
|
25
25
|
*/
|
|
26
26
|
this.testimonials = false;
|
|
27
27
|
this.customerId = null;
|
|
28
|
+
this.initialDataVersion = 0;
|
|
28
29
|
// Translations
|
|
29
30
|
this.noComments = salla.lang.get('blocks.comments.no_comments');
|
|
30
31
|
this.comment_title = '';
|
|
@@ -63,6 +64,18 @@ export class SallaComments {
|
|
|
63
64
|
setTranslations();
|
|
64
65
|
});
|
|
65
66
|
}
|
|
67
|
+
resetInfiniteScroll() {
|
|
68
|
+
clearTimeout(this.initialDataTimer);
|
|
69
|
+
if (this.infiniteScroll) {
|
|
70
|
+
this.infiniteScroll.destroy();
|
|
71
|
+
const instances = salla.infiniteScroll.instances;
|
|
72
|
+
for (let index = instances.length - 1; index >= 0; index--) {
|
|
73
|
+
if (instances[index] === this.infiniteScroll)
|
|
74
|
+
instances.splice(index, 1);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
this.infiniteScroll = undefined;
|
|
78
|
+
}
|
|
66
79
|
get sortOptions() {
|
|
67
80
|
return buildCommentSortOptions({
|
|
68
81
|
mostHelpfulLabel: this.mostHelpfulLabel,
|
|
@@ -197,7 +210,7 @@ export class SallaComments {
|
|
|
197
210
|
this.wrapper.append(loading);
|
|
198
211
|
}
|
|
199
212
|
this.nextPage = null;
|
|
200
|
-
this.loadInitialData();
|
|
213
|
+
return this.loadInitialData();
|
|
201
214
|
}
|
|
202
215
|
// Get comment item HTML
|
|
203
216
|
getCommentHTML(comment) {
|
|
@@ -249,6 +262,8 @@ export class SallaComments {
|
|
|
249
262
|
}
|
|
250
263
|
// Load initial data
|
|
251
264
|
async loadInitialData() {
|
|
265
|
+
const version = ++this.initialDataVersion;
|
|
266
|
+
this.resetInfiniteScroll();
|
|
252
267
|
try {
|
|
253
268
|
let resp = { data: [], pagination: {} };
|
|
254
269
|
const searchParams = new URLSearchParams(window.location.search);
|
|
@@ -269,6 +284,8 @@ export class SallaComments {
|
|
|
269
284
|
: null;
|
|
270
285
|
resp = await salla.api.comment.getComments(this.type, this.itemId, 1, 5, this.sort, this.customerId);
|
|
271
286
|
}
|
|
287
|
+
if (version !== this.initialDataVersion)
|
|
288
|
+
return;
|
|
272
289
|
if (!resp.data || !resp.data.length) {
|
|
273
290
|
this.showPlaceholder = false;
|
|
274
291
|
this.comments = [];
|
|
@@ -299,7 +316,9 @@ export class SallaComments {
|
|
|
299
316
|
this.total = resp.pagination.total;
|
|
300
317
|
this.nextPage = typeof resp.pagination.links === 'object' && !!resp.pagination.links.next ? resp.pagination.links.next : null;
|
|
301
318
|
this.patchNextPageUrl();
|
|
302
|
-
setTimeout(() => {
|
|
319
|
+
this.initialDataTimer = setTimeout(() => {
|
|
320
|
+
if (version !== this.initialDataVersion || !this.wrapper)
|
|
321
|
+
return;
|
|
303
322
|
for (const card of this.handleResponse(resp)) {
|
|
304
323
|
this.wrapper.append(card);
|
|
305
324
|
}
|
|
@@ -309,6 +328,8 @@ export class SallaComments {
|
|
|
309
328
|
}, 100);
|
|
310
329
|
}
|
|
311
330
|
catch (error) {
|
|
331
|
+
if (version !== this.initialDataVersion)
|
|
332
|
+
return;
|
|
312
333
|
console.error('Error loading initial data:', error);
|
|
313
334
|
this.showPlaceholder = true;
|
|
314
335
|
this.loading(false);
|
|
@@ -342,6 +342,14 @@ export class SallaFileUpload {
|
|
|
342
342
|
}
|
|
343
343
|
return this.value || '';
|
|
344
344
|
}
|
|
345
|
+
isValidUploadResult(value) {
|
|
346
|
+
if (Array.isArray(value)) {
|
|
347
|
+
return value.length > 0 && value.every(item => typeof item === 'string' && this.isValidUploadResult(item));
|
|
348
|
+
}
|
|
349
|
+
// Keep relative paths and existing URL shapes; reject missing/coerced results.
|
|
350
|
+
return typeof value === 'string' && value.trim().length > 0 &&
|
|
351
|
+
!['undefined', 'null', '[object Object]'].includes(value.trim());
|
|
352
|
+
}
|
|
345
353
|
usesSplitCountLimits() {
|
|
346
354
|
return usesSplitCountLimits(this.maxImagesCount, this.maxVideosCount);
|
|
347
355
|
}
|
|
@@ -879,12 +887,12 @@ export class SallaFileUpload {
|
|
|
879
887
|
this.revokeAllPreviewObjectUrls();
|
|
880
888
|
}
|
|
881
889
|
render() {
|
|
882
|
-
return (h(Host, { key: '
|
|
890
|
+
return (h(Host, { key: '77ac3b040e8c7e2b3dcc0957cbb761675b667a83', class: {
|
|
883
891
|
"s-file-upload": true,
|
|
884
892
|
"s-file-upload-profile-image": this.profileImage,
|
|
885
893
|
"s-file-upload-multiple": this.allowMultiple,
|
|
886
894
|
"s-file-upload-has-gallery": this.usesGalleryPreview(),
|
|
887
|
-
} }, h("input", { key: '
|
|
895
|
+
} }, h("input", { key: '8fdb2cc6f73427929a77a985018e5fc7df7cbd88', type: "file", name: this.name, ref: ele => this.fileUploader = ele, required: this.required, class: "s-file-upload-wrapper s-file-upload-input", accept: this.accept }), this.allowMultiple && this.showMaxCountHint ? h("div", { class: "s-file-upload-hint s-hidden" }, this.max_count_hint(this.getTotalMaxFiles())) : '', h("input", { key: 'dfc1c8e1315c8a73685b24cd869f8df47ac42a35', class: "s-hidden", name: 'hidden-' + this.name, required: this.required, value: this.getHiddenInputValue(), ref: input => this.hiddenInput = input }), this.renderPreviewGallery()));
|
|
888
896
|
}
|
|
889
897
|
async componentDidLoad() {
|
|
890
898
|
await Salla.onReady();
|
|
@@ -948,8 +956,12 @@ export class SallaFileUpload {
|
|
|
948
956
|
}
|
|
949
957
|
},
|
|
950
958
|
onprocessfile: (error, file) => {
|
|
951
|
-
|
|
952
|
-
|
|
959
|
+
// A 2xx response without a usable upload result is still a failed upload.
|
|
960
|
+
const uploadError = error || (file.serverId == null
|
|
961
|
+
? { type: 'error', body: salla.lang.get('common.errors.error_occurred') }
|
|
962
|
+
: null);
|
|
963
|
+
if (uploadError) {
|
|
964
|
+
this.notifyUploadError(uploadError, file);
|
|
953
965
|
this.removeFailedFile(file);
|
|
954
966
|
if (this.usesGalleryPreview()) {
|
|
955
967
|
this.schedulePreviewFilesSync();
|
|
@@ -1026,10 +1038,21 @@ export class SallaFileUpload {
|
|
|
1026
1038
|
// @ts-ignore
|
|
1027
1039
|
process: {
|
|
1028
1040
|
onload: (response) => {
|
|
1029
|
-
let responseData
|
|
1041
|
+
let responseData;
|
|
1042
|
+
try {
|
|
1043
|
+
const result = JSON.parse(response);
|
|
1044
|
+
if (!result || result.success === false)
|
|
1045
|
+
return null;
|
|
1046
|
+
responseData = result.data;
|
|
1047
|
+
}
|
|
1048
|
+
catch {
|
|
1049
|
+
return null;
|
|
1050
|
+
}
|
|
1030
1051
|
if ((this.instantUpload || this.allowMultiple) && Array.isArray(responseData) && responseData.length > 0) {
|
|
1031
1052
|
const item = responseData[0];
|
|
1032
1053
|
const fileUrl = typeof item === 'object' && item !== null ? item.filePath || item.url : item;
|
|
1054
|
+
if (!this.isValidUploadResult(fileUrl))
|
|
1055
|
+
return null;
|
|
1033
1056
|
const fileId = this.generateUploadFileId();
|
|
1034
1057
|
// Store the upload result to be picked up by onprocessfile
|
|
1035
1058
|
this.uploadedFiles = [
|
|
@@ -1044,6 +1067,8 @@ export class SallaFileUpload {
|
|
|
1044
1067
|
const fileUrl = typeof responseData === 'object' && responseData !== null
|
|
1045
1068
|
? responseData.filePath || responseData.url
|
|
1046
1069
|
: responseData;
|
|
1070
|
+
if (!this.isValidUploadResult(fileUrl))
|
|
1071
|
+
return null;
|
|
1047
1072
|
const fileId = typeof responseData === 'object' && responseData !== null && responseData.id
|
|
1048
1073
|
? responseData.id
|
|
1049
1074
|
: this.generateUploadFileId();
|