@salla.sa/twilight-components 2.14.543 → 2.14.545
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-uhJt4caG.js → filepond-B5aWlI3l.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-Dy-GRHf0.js → filepond-plugin-file-poster-BYq39KHd.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-BWIBGLW-.js → filepond-plugin-file-validate-size-Bi3TAsJv.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-DEVtMF0l.js → filepond-plugin-file-validate-type-Ck6S5TuZ.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-DSDoJaLw.js → filepond-plugin-image-edit-DbsdnH5j.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-BdZit5hj.js → filepond-plugin-image-exif-orientation-x7TfJR-2.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-Z3_zQyYR.js → filepond-plugin-image-preview-CrU7vIRk.js} +1 -1
- package/dist/cjs/helpers-DHdDjm5V.js +340 -0
- package/dist/cjs/{index-Bw3b6O6G.js → index-DGpOR-TH.js} +14 -14
- package/dist/cjs/{intlTelInput-CXe3TkdL.js → intlTelInput-DKAXRecW.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{mail-CO8cFZH7.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 +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-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-attachment-view_9.cjs.entry.js +10 -10
- 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_2.cjs.entry.js +156 -401
- 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-cart-summary-card.cjs.entry.js +1 -1
- 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 → salla-comment-form_8.cjs.entry.js} +3 -259
- 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 +21 -5
- 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 +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 +3 -3
- 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_2.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_2.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-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 +3 -3
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +14 -73
- package/dist/cjs/salla-rating-modal.cjs.entry.js +7 -22
- 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.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 +4 -4
- 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-tooltip.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 +3 -3
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-GTx-kpDm.js → vanilla-picker-DQDSSf6Q.js} +1 -1
- package/dist/collection/collection-manifest.json +12 -14
- package/dist/collection/components/salla-bullet-delivery/helpers.js +3 -0
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +82 -16
- package/dist/collection/components/salla-comments/interfaces.js +0 -12
- package/dist/collection/components/salla-comments/salla-comment-item.js +1 -1
- package/dist/collection/components/salla-comments/salla-comments.js +5 -38
- package/dist/collection/components/salla-delivery-promise/delivery-promise-api.js +1 -1
- package/dist/collection/components/salla-delivery-promise/delivery-promise-intent.js +9 -0
- package/dist/collection/components/salla-delivery-promise/salla-delivery-promise.js +10 -3
- package/dist/collection/components/salla-rating-modal/salla-rating-modal-v2.js +16 -119
- package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +10 -69
- package/dist/components/helpers.js +319 -0
- package/dist/components/index.js +2 -2
- package/dist/components/salla-bullet-delivery.js +82 -327
- package/dist/components/salla-comment-item2.js +1 -1
- package/dist/components/salla-comments.js +1 -40
- package/dist/components/salla-delivery-promise.js +20 -4
- package/dist/components/salla-rating-modal-v22.js +12 -73
- package/dist/components/salla-rating-modal.js +591 -1
- package/dist/esm/{filepond-plugin-file-poster-BTU_WzVu.js → filepond-plugin-file-poster-CkWxCmZT.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-c_09APqP.js → filepond-plugin-file-validate-size-DlWS-oUK.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-Dz2Lgh8V.js → filepond-plugin-file-validate-type-mdpFM1TG.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DK7eXs2p.js → filepond-plugin-image-edit-BqPLKgZU.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-DYBURwn_.js → filepond-plugin-image-exif-orientation-CMqFjPu7.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-4WNiH-ie.js → filepond-plugin-image-preview-DjCwk-CI.js} +1 -1
- package/dist/esm/{filepond-BcXR53L3.js → filepond-wd7_MQSV.js} +1 -1
- package/dist/esm/helpers-BDChq2t4.js +319 -0
- package/dist/esm/{index-BW1au-Nh.js → index-CHZfg_a9.js} +14 -14
- package/dist/esm/{intlTelInput-DvPcVtVG.js → intlTelInput-B5Q8rrU9.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{mail-DmgxDvXL.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 +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-apps-icons.entry.js +1 -1
- package/dist/esm/salla-attachment-view_9.entry.js +10 -10
- 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_2.entry.js +83 -328
- 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-cart-summary-card.entry.js +1 -1
- 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 → salla-comment-form_8.entry.js} +4 -259
- 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 +21 -5
- 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 +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 +3 -3
- 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_2.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_2.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-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 +3 -3
- package/dist/esm/salla-rating-modal-v2.entry.js +14 -73
- package/dist/esm/salla-rating-modal.entry.js +7 -22
- 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.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 +4 -4
- 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-tooltip.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 +3 -3
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/salla-wishlist-actions.entry.js +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-CDk_knNu.js → vanilla-picker-uNDULydX.js} +1 -1
- package/dist/twilight/{p-df202b1d.entry.js → p-0495bfac.entry.js} +1 -1
- package/dist/twilight/{p-13dbbbdc.entry.js → p-0573a498.entry.js} +1 -1
- package/dist/twilight/{p-b89d8c3c.entry.js → p-06d9e1c5.entry.js} +1 -1
- package/dist/twilight/{p-b1dfc455.entry.js → p-0749cc55.entry.js} +1 -1
- package/dist/twilight/p-0ae39262.entry.js +4 -0
- package/dist/twilight/{p-de83979a.entry.js → p-12836275.entry.js} +1 -1
- package/dist/twilight/p-12f61ae1.entry.js +4 -0
- package/dist/twilight/{p-69f4a089.entry.js → p-1419a93d.entry.js} +1 -1
- package/dist/twilight/{p-baa06c65.entry.js → p-17d49c87.entry.js} +1 -1
- package/dist/twilight/{p-1282e22a.entry.js → p-1ea25389.entry.js} +1 -1
- package/dist/twilight/{p-80c11fae.entry.js → p-2305edcc.entry.js} +1 -1
- package/dist/twilight/{p-10534171.entry.js → p-235d7596.entry.js} +1 -1
- package/dist/twilight/{p-50c0b6fa.entry.js → p-25d9f1b2.entry.js} +1 -1
- package/dist/twilight/{p-16ccbce5.entry.js → p-25f51a7e.entry.js} +1 -1
- package/dist/twilight/{p-3c28560f.entry.js → p-279a1661.entry.js} +1 -1
- package/dist/twilight/{p-ac794ed6.entry.js → p-28248b6b.entry.js} +1 -1
- package/dist/twilight/{p-7afd066a.entry.js → p-2d01a4f5.entry.js} +1 -1
- package/dist/twilight/{p-66c7b9e4.entry.js → p-2d62c947.entry.js} +1 -1
- package/dist/twilight/{p-489d084c.entry.js → p-2db5e829.entry.js} +1 -1
- package/dist/twilight/{p-362792d6.entry.js → p-2de58591.entry.js} +1 -1
- package/dist/twilight/{p-16296dce.entry.js → p-32e3daa3.entry.js} +1 -1
- package/dist/twilight/{p-beb2110d.entry.js → p-345532e5.entry.js} +1 -1
- package/dist/twilight/{p-280e67f0.entry.js → p-346366ba.entry.js} +1 -1
- package/dist/twilight/{p-46399dc8.entry.js → p-35557962.entry.js} +1 -1
- package/dist/twilight/{p-d54acab0.entry.js → p-3672d4f7.entry.js} +1 -1
- package/dist/twilight/{p-315890b5.entry.js → p-37163aef.entry.js} +1 -1
- package/dist/twilight/{p-e184cd72.entry.js → p-391a2ec6.entry.js} +1 -1
- package/dist/twilight/{p-b2b818a5.entry.js → p-3a8be7df.entry.js} +1 -1
- package/dist/twilight/{p-ceb40475.entry.js → p-3f5bc617.entry.js} +1 -1
- package/dist/twilight/{p-cf4efddb.entry.js → p-419499d6.entry.js} +1 -1
- package/dist/twilight/{p-d018fc49.entry.js → p-4ac9a3b6.entry.js} +1 -1
- package/dist/twilight/{p-aa9fb9f5.entry.js → p-5074de7d.entry.js} +1 -1
- package/dist/twilight/{p-65a86613.entry.js → p-51a062cd.entry.js} +1 -1
- package/dist/twilight/p-54e2d320.entry.js +1024 -0
- package/dist/twilight/{p-84679cc1.entry.js → p-5933ba05.entry.js} +1 -1
- package/dist/twilight/{p-4b14e0f8.entry.js → p-5d9a85b0.entry.js} +1 -1
- package/dist/twilight/{p-d7a68f6c.entry.js → p-5ded000f.entry.js} +1 -1
- package/dist/twilight/{p-a3fdec51.entry.js → p-63b01300.entry.js} +1 -1
- package/dist/twilight/{p-677bcf4c.entry.js → p-64efbb2c.entry.js} +1 -1
- package/dist/twilight/{p-feb80402.entry.js → p-67b91397.entry.js} +1 -1
- package/dist/twilight/{p-9b1403fc.entry.js → p-69119c00.entry.js} +1 -1
- package/dist/twilight/{p-6e78ee63.entry.js → p-6c18cc72.entry.js} +1 -1
- package/dist/twilight/{p-1ba8fb02.entry.js → p-6d961d73.entry.js} +1 -1
- package/dist/twilight/{p-64f0c216.entry.js → p-6ff53523.entry.js} +1 -1
- package/dist/twilight/{p-75065cbf.entry.js → p-72ee7071.entry.js} +1 -1
- package/dist/twilight/{p-6d6618f8.entry.js → p-72f54055.entry.js} +1 -1
- package/dist/twilight/{p-3b9dcb0f.entry.js → p-74529abb.entry.js} +1 -1
- package/dist/twilight/{p-664d428e.entry.js → p-766a3291.entry.js} +1 -1
- package/dist/twilight/{p-d3692caf.entry.js → p-788fd019.entry.js} +1 -1
- package/dist/twilight/{p-a15b4245.entry.js → p-82fe9f82.entry.js} +1 -1
- package/dist/twilight/{p-f45f5f91.entry.js → p-832f3a98.entry.js} +1 -1
- package/dist/twilight/{p-89fe5237.entry.js → p-84380d4a.entry.js} +1 -1
- package/dist/twilight/{p-311a905b.entry.js → p-8780a467.entry.js} +1 -1
- package/dist/twilight/{p-7adefcd6.entry.js → p-87e10a68.entry.js} +1 -1
- package/dist/twilight/{p-3cfd4fcd.entry.js → p-88f50d7e.entry.js} +1 -1
- package/dist/twilight/{p-f0a04676.entry.js → p-8fc6e860.entry.js} +1 -1
- package/dist/twilight/{p-cc3a9188.entry.js → p-90e5c3ab.entry.js} +1 -1
- package/dist/twilight/{p-641cc01d.entry.js → p-93aa1b67.entry.js} +1 -1
- package/dist/twilight/{p-a4436d17.entry.js → p-93dabb47.entry.js} +1 -1
- package/dist/twilight/{p-07c013f9.entry.js → p-98108ebe.entry.js} +1 -1
- package/dist/twilight/{p-72960bb3.entry.js → p-989f2adb.entry.js} +1 -1
- package/dist/twilight/{p-4be8900d.entry.js → p-9d224252.entry.js} +1 -1
- package/dist/twilight/p-BDChq2t4.js +4 -0
- package/dist/twilight/{p-D9Y6HNvi.js → p-BPkSO6gd.js} +1 -1
- package/dist/twilight/{p-BUMDIRU5.js → p-BWvO3cE-.js} +1 -1
- package/dist/twilight/{p-BW1au-Nh.js → p-CHZfg_a9.js} +1 -1
- package/dist/twilight/{p-AncUY1nn.js → p-CdgES2Of.js} +1 -1
- package/dist/twilight/{p-DPMPVhgw.js → p-D9VjvNQq.js} +2 -2
- package/dist/twilight/{p-C6nX89oY.js → p-DO7S0QBX.js} +1 -1
- package/dist/twilight/{p-UDPL8zGN.js → p-DtV7npW9.js} +1 -1
- package/dist/twilight/{p-DmgxDvXL.js → p-DzAIgzdz.js} +1 -1
- package/dist/twilight/{p-UIEwOe70.js → p-PCp-0mbL.js} +1 -1
- package/dist/twilight/{p-BjS2Vb6h.js → p-ZinKLSYw.js} +1 -1
- package/dist/twilight/{p-1c82117c.entry.js → p-a0561bd1.entry.js} +1 -1
- package/dist/twilight/{p-1187210a.entry.js → p-a785b49f.entry.js} +1 -1
- package/dist/twilight/{p-13bf1c47.entry.js → p-aa4daadf.entry.js} +1 -1
- package/dist/twilight/p-ab41d26c.entry.js +4 -0
- package/dist/twilight/{p-87cc2e08.entry.js → p-afb03ee5.entry.js} +1 -1
- package/dist/twilight/{p-caa8d5ae.entry.js → p-b279e0bb.entry.js} +1 -1
- package/dist/twilight/{p-bcee5564.entry.js → p-b33392c6.entry.js} +1 -1
- package/dist/twilight/{p-e1eb70d2.entry.js → p-b38c4e39.entry.js} +1 -1
- package/dist/twilight/{p-26f8a482.entry.js → p-bead6e6f.entry.js} +1 -1
- package/dist/twilight/{p-8643930a.entry.js → p-c26043ff.entry.js} +1 -1
- package/dist/twilight/{p-a7a10dbf.entry.js → p-c287e498.entry.js} +1 -1
- package/dist/twilight/{p-87af932a.entry.js → p-c2fe2dbe.entry.js} +1 -1
- package/dist/twilight/{p-6d3a4c41.entry.js → p-c603722c.entry.js} +1 -1
- package/dist/twilight/{p-edebecb3.entry.js → p-c816b198.entry.js} +1 -1
- package/dist/twilight/{p-f3f9d1fb.entry.js → p-c81bce54.entry.js} +1 -1
- package/dist/twilight/{p-40555637.entry.js → p-c9146d50.entry.js} +1 -1
- package/dist/twilight/{p-5335f307.entry.js → p-c92edd6f.entry.js} +1 -1
- package/dist/twilight/{p-821aa95a.entry.js → p-c948a8a8.entry.js} +1 -1
- package/dist/twilight/{p-93c006fc.entry.js → p-d0d3609c.entry.js} +1 -1
- package/dist/twilight/{p-a38dc391.entry.js → p-d9b0fa64.entry.js} +1 -1
- package/dist/twilight/{p-534e7760.entry.js → p-dd823fde.entry.js} +1 -1
- package/dist/twilight/p-e36f62a9.entry.js +4 -0
- package/dist/twilight/{p-beaab93e.entry.js → p-e5a3b689.entry.js} +1 -1
- package/dist/twilight/{p-c7e980aa.entry.js → p-ec281904.entry.js} +1 -1
- package/dist/twilight/{p-68d6fa66.entry.js → p-f07bbbc7.entry.js} +1 -1
- package/dist/twilight/{p-3ad55c42.entry.js → p-f168109d.entry.js} +1 -1
- package/dist/twilight/{p-e8153a9a.entry.js → p-f1d8729d.entry.js} +1 -1
- package/dist/twilight/{p-2a8f1ed4.entry.js → p-f1dfe18b.entry.js} +1 -1
- package/dist/twilight/{p-c23f7b95.entry.js → p-fb1ad954.entry.js} +1 -1
- package/dist/twilight/{p-c214700a.entry.js → p-ffdf5f92.entry.js} +1 -1
- package/dist/twilight/{p-CMWS1gyZ.js → p-ryHWESoh.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-bullet-delivery/helpers.d.ts +1 -0
- package/dist/types/components/salla-bullet-delivery/interfaces.d.ts +14 -4
- package/dist/types/components/salla-bullet-delivery/salla-bullet-delivery.d.ts +2 -0
- package/dist/types/components/salla-comments/interfaces.d.ts +0 -15
- package/dist/types/components/salla-comments/salla-comments.d.ts +2 -5
- package/dist/types/components/salla-delivery-promise/delivery-promise-intent.d.ts +0 -4
- package/dist/types/components/salla-delivery-promise/interfaces.d.ts +2 -1
- package/dist/types/components/salla-rating-modal/salla-rating-modal-v2.d.ts +3 -16
- package/dist/types/components/salla-rating-modal/salla-rating-modal.d.ts +2 -10
- package/dist/types/components.d.ts +12 -45
- package/package.json +5 -5
- package/dist/collection/components/salla-verified-review/salla-verified-review.css +0 -162
- package/dist/collection/components/salla-verified-review/salla-verified-review.js +0 -264
- package/dist/components/salla-rating-modal2.js +0 -613
- package/dist/components/salla-verified-review.d.ts +0 -11
- package/dist/components/salla-verified-review.js +0 -325
- package/dist/twilight/p-03d77f90.entry.js +0 -4
- package/dist/twilight/p-4f052df8.entry.js +0 -4
- package/dist/twilight/p-a9674965.entry.js +0 -4
- package/dist/twilight/p-cbe760ce.entry.js +0 -4
- package/dist/twilight/p-e29f28eb.entry.js +0 -1019
- package/dist/types/components/salla-verified-review/salla-verified-review.d.ts +0 -51
|
@@ -7,15 +7,3 @@ export var CommentType;
|
|
|
7
7
|
CommentType["PRODUCT"] = "product";
|
|
8
8
|
CommentType["BLOG"] = "blog";
|
|
9
9
|
})(CommentType || (CommentType = {}));
|
|
10
|
-
export function isFeatureEnabled(feature) {
|
|
11
|
-
return !!salla.config.get('store.features')?.includes(feature);
|
|
12
|
-
}
|
|
13
|
-
export function buildCommentSortOptions({ mostHelpfulLabel, verifiedPurchasesLabel, allowLikes, allowVerifiedPurchasesFilter, }) {
|
|
14
|
-
const options = [
|
|
15
|
-
{ value: 'latest', label: salla.lang.get('pages.testimonials.sort_by_date_desc'), selected: true },
|
|
16
|
-
{ value: 'oldest', label: salla.lang.get('pages.testimonials.sort_by_date_asc') },
|
|
17
|
-
{ value: 'most_helpful', label: mostHelpfulLabel, show: allowLikes },
|
|
18
|
-
{ value: 'verified_purchases', label: verifiedPurchasesLabel, show: allowVerifiedPurchasesFilter },
|
|
19
|
-
];
|
|
20
|
-
return options.filter(option => option.show !== false);
|
|
21
|
-
}
|
|
@@ -162,7 +162,7 @@ export class SallaCommentItem {
|
|
|
162
162
|
: null, (this.comment.has_order || !!this.comment.rating) && !this.comment.is_pending && !this.hideBought ?
|
|
163
163
|
h("div", { class: "s-comments-flex" }, this.comment.has_order ?
|
|
164
164
|
[h("span", { class: "s-comments-item-has-order-check-icon", innerHTML: CheckIcon }), h("span", { class: "s-comments-item-has-order-check-text" }, this.has_bought_trans, " ", this.comment.rating ? ', ' : '')] : null, !!this.comment.rating ?
|
|
165
|
-
h("span", { class: "s-comments-item-
|
|
165
|
+
h("span", { class: "s-comments-item-rated-widget" }, this.rated_trans) : null)
|
|
166
166
|
: null), h("p", { class: "s-comments-item-timestamp s-ltr" }, this.getDate(this.comment.created_at?.date), h("span", { class: "s-comments-item-time" }, " - ", this.getTime(this.comment.created_at?.date)))), (!!this.comment.rating || !!this.comment.stars || hasReviewFactors) && (h("div", { class: "flex flex-row gap-4 mt-2 mb-4" }, (!!this.comment.rating || !!this.comment.stars) ? (h("salla-rating-stars", { class: "w-auto", size: "medium", value: this.comment.rating || this.comment.stars })) : null, hasReviewFactors && (h("button", { class: "s-comments-item-review-factors-toggle", type: "button", onClick: () => (this.showReviewFactors = !this.showReviewFactors) }, h("span", null, this.reviewDetailsLabel), h("span", { class: {
|
|
167
167
|
"s-comments-item-review-factors-chevron": true,
|
|
168
168
|
"is-open": this.showReviewFactors,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
4
|
import { h } from "@stencil/core";
|
|
5
|
-
import { CommentType
|
|
5
|
+
import { CommentType } from "./interfaces";
|
|
6
6
|
import anime from "animejs";
|
|
7
7
|
import Helper from "../../Helpers/Helper";
|
|
8
8
|
import ChatBubbles from "../../assets/svg/chat-bubbles.svg";
|
|
@@ -31,7 +31,6 @@ export class SallaComments {
|
|
|
31
31
|
this.comment_name = salla.lang.get('blocks.comments.comment');
|
|
32
32
|
this.showRatingSummary = salla.config.get('store.settings.rating.show_rating_summary');
|
|
33
33
|
this.allowLikes = salla.config.get('store.settings.rating.allow_likes');
|
|
34
|
-
this.allowVerifiedPurchasesFilter = isFeatureEnabled('allow-reviews-from-product-page');
|
|
35
34
|
salla.onReady(() => {
|
|
36
35
|
this.allowLikes = salla.config.get('store.settings.rating.allow_likes');
|
|
37
36
|
this.showRatingSummary = salla.config.get('store.settings.rating.show_rating_summary');
|
|
@@ -52,10 +51,7 @@ export class SallaComments {
|
|
|
52
51
|
const setTranslations = async () => {
|
|
53
52
|
await setNestedAsync('ar.trans', 'blocks.comments.most_helpful', 'الأكثر إفادة');
|
|
54
53
|
await setNestedAsync('en.trans', 'blocks.comments.most_helpful', 'Most helpful');
|
|
55
|
-
await setNestedAsync('ar.trans', 'blocks.comments.verified_purchases', 'عمليات شراء موثقة');
|
|
56
|
-
await setNestedAsync('en.trans', 'blocks.comments.verified_purchases', 'Verified purchases');
|
|
57
54
|
this.mostHelpfulLabel = salla.lang.get('blocks.comments.most_helpful');
|
|
58
|
-
this.verifiedPurchasesLabel = salla.lang.get('blocks.comments.verified_purchases');
|
|
59
55
|
this.comment_title = salla.lang.get('blocks.comments.overall_rating');
|
|
60
56
|
this.comment_name = salla.lang.get('blocks.comments.comment');
|
|
61
57
|
this.noComments = salla.lang.get('pages.rating.no_ratings');
|
|
@@ -63,14 +59,6 @@ export class SallaComments {
|
|
|
63
59
|
setTranslations();
|
|
64
60
|
});
|
|
65
61
|
}
|
|
66
|
-
get sortOptions() {
|
|
67
|
-
return buildCommentSortOptions({
|
|
68
|
-
mostHelpfulLabel: this.mostHelpfulLabel,
|
|
69
|
-
verifiedPurchasesLabel: this.verifiedPurchasesLabel,
|
|
70
|
-
allowLikes: this.allowLikes,
|
|
71
|
-
allowVerifiedPurchasesFilter: this.allowVerifiedPurchasesFilter,
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
62
|
// TOOD: it's a good idea to move this into lang.js
|
|
75
63
|
// Pluralize a string based on the count
|
|
76
64
|
pluralize(phrases, count) {
|
|
@@ -271,19 +259,6 @@ export class SallaComments {
|
|
|
271
259
|
}
|
|
272
260
|
if (!resp.data || !resp.data.length) {
|
|
273
261
|
this.showPlaceholder = false;
|
|
274
|
-
this.comments = [];
|
|
275
|
-
this.nextPage = '';
|
|
276
|
-
// The wrapper is populated imperatively (see the success branch and
|
|
277
|
-
// onCommentAdded below), so swap its content directly instead of
|
|
278
|
-
// toggling showPlaceholder: that would tear down the header/sort
|
|
279
|
-
// filter too, losing the ability to switch sort back.
|
|
280
|
-
if (this.wrapper) {
|
|
281
|
-
this.wrapper.innerHTML = '';
|
|
282
|
-
const empty = document.createElement('div');
|
|
283
|
-
empty.className = 's-comments-placeholder';
|
|
284
|
-
empty.innerHTML = `<span>${ChatBubbles}</span><p>${this.noComments}</p>`;
|
|
285
|
-
this.wrapper.append(empty);
|
|
286
|
-
}
|
|
287
262
|
this.loading(false);
|
|
288
263
|
return;
|
|
289
264
|
}
|
|
@@ -323,7 +298,7 @@ export class SallaComments {
|
|
|
323
298
|
h("div", { class: "s-comments-filter-wrapper" }, h("label", { class: "s-comments-filter-label", htmlFor: "comments-filter" }, salla.lang.get('pages.categories.sorting')), h("select", { id: "comments-filter", "aria-label": salla.lang.get('pages.categories.sorting'), class: "s-form-control s-comments-sort-input", onChange: (e) => {
|
|
324
299
|
this.sort = e.target.value;
|
|
325
300
|
this.reload();
|
|
326
|
-
} },
|
|
301
|
+
} }, h("option", { value: "latest", selected: true }, salla.lang.get("pages.testimonials.sort_by_date_desc")), h("option", { value: "oldest" }, salla.lang.get("pages.testimonials.sort_by_date_asc")), this.allowLikes && h("option", { value: "most_helpful" }, this.mostHelpfulLabel)))
|
|
327
302
|
: ''), h("div", { ref: wrapper => {
|
|
328
303
|
this.wrapper = wrapper;
|
|
329
304
|
} }), this.nextPage && (h("div", { class: "s-infinite-scroll-wrapper", ref: status => {
|
|
@@ -511,15 +486,9 @@ export class SallaComments {
|
|
|
511
486
|
"attribute": "sort",
|
|
512
487
|
"mutable": false,
|
|
513
488
|
"complexType": {
|
|
514
|
-
"original": "string |
|
|
489
|
+
"original": "string | 'latest' | 'oldest' | 'bottom_rating' | 'top_rating'",
|
|
515
490
|
"resolved": "string",
|
|
516
|
-
"references": {
|
|
517
|
-
"CommentSort": {
|
|
518
|
-
"location": "import",
|
|
519
|
-
"path": "./interfaces",
|
|
520
|
-
"id": "src/components/salla-comments/interfaces.ts::CommentSort"
|
|
521
|
-
}
|
|
522
|
-
}
|
|
491
|
+
"references": {}
|
|
523
492
|
},
|
|
524
493
|
"required": false,
|
|
525
494
|
"optional": false,
|
|
@@ -561,14 +530,12 @@ export class SallaComments {
|
|
|
561
530
|
"showPlaceholder": {},
|
|
562
531
|
"nextPage": {},
|
|
563
532
|
"mostHelpfulLabel": {},
|
|
564
|
-
"verifiedPurchasesLabel": {},
|
|
565
533
|
"noComments": {},
|
|
566
534
|
"comment_title": {},
|
|
567
535
|
"comment_name": {},
|
|
568
536
|
"placeholder_text": {},
|
|
569
537
|
"showRatingSummary": {},
|
|
570
|
-
"allowLikes": {}
|
|
571
|
-
"allowVerifiedPurchasesFilter": {}
|
|
538
|
+
"allowLikes": {}
|
|
572
539
|
};
|
|
573
540
|
}
|
|
574
541
|
static get methods() {
|
|
@@ -32,7 +32,7 @@ export async function fetchDeliveryMessage(productId, id, optionType, isLoginCyc
|
|
|
32
32
|
const response = (await salla.api.withoutNotifier(() => salla.api.request(salla.url.api(`products/${productId}/delivery-promises${queryString}`))));
|
|
33
33
|
if (!response.success) {
|
|
34
34
|
log('fetchDeliveryMessage error', { response });
|
|
35
|
-
|
|
35
|
+
return null;
|
|
36
36
|
}
|
|
37
37
|
const message = response.data?.message?.trim();
|
|
38
38
|
log('fetchDeliveryMessage success', { message });
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
+
/**
|
|
5
|
+
* Bullet delivery intent helpers.
|
|
6
|
+
* Reads/writes the same storage key as salla-bullet-delivery so both components stay in sync.
|
|
7
|
+
*/
|
|
8
|
+
import { isMapOriginIntent } from "../salla-bullet-delivery/helpers";
|
|
4
9
|
const INTENT_KEY = 'bullet_delivery_intent';
|
|
5
10
|
function getIntentStorage() {
|
|
6
11
|
const rememberLastSession = Boolean(salla.config.get('store.settings.bullet_delivery.settings.remember_last_session'));
|
|
@@ -22,6 +27,10 @@ export function resolveIntent() {
|
|
|
22
27
|
if (cityId != null) {
|
|
23
28
|
return { type: 'address', option: { id: cityId, name: cityName } };
|
|
24
29
|
}
|
|
30
|
+
// Map-origin pick: no city id to query a delivery estimate by, but still show the address.
|
|
31
|
+
if (isMapOriginIntent(intent) && intent.address_details?.formatted_address) {
|
|
32
|
+
return { type: 'address', option: { name: intent.address_details.formatted_address } };
|
|
33
|
+
}
|
|
25
34
|
return null;
|
|
26
35
|
}
|
|
27
36
|
if (intent.type === 'branch') {
|
|
@@ -123,12 +123,19 @@ export class SallaDeliveryPromise {
|
|
|
123
123
|
this.selectedCityLoginCycle = resolved.option;
|
|
124
124
|
this.selectedBranchLoginCycle = null;
|
|
125
125
|
this.selectedLabel = `${this.labels.deliveryTo} ${resolved.option.name || this.labels.selectCity}`;
|
|
126
|
-
|
|
126
|
+
// Map-origin picks have no resolved city id — nothing to query a delivery estimate by.
|
|
127
|
+
if (resolved.option.id != null) {
|
|
128
|
+
void this.loadDeliveryMessage(resolved.option.id, 'city');
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
this.deliveryMessage = null;
|
|
132
|
+
}
|
|
127
133
|
}
|
|
128
134
|
else {
|
|
129
135
|
this.selectedBranchLoginCycle = resolved.option;
|
|
130
136
|
this.selectedCityLoginCycle = null;
|
|
131
137
|
this.selectedLabel = `${this.labels.pickupFromBranch} ${resolved.option.name}`;
|
|
138
|
+
// Branch resolution in resolveIntent() always sets an id.
|
|
132
139
|
void this.loadDeliveryMessage(resolved.option.id, 'branch');
|
|
133
140
|
}
|
|
134
141
|
return true;
|
|
@@ -183,8 +190,8 @@ export class SallaDeliveryPromise {
|
|
|
183
190
|
this.deliveryMessage = await fetchDeliveryMessage(this.productId, id, optionType, this.isLoginCycleEnabled);
|
|
184
191
|
}
|
|
185
192
|
catch (error) {
|
|
186
|
-
|
|
187
|
-
this.
|
|
193
|
+
log('loadDeliveryMessage failed', { id, optionType, error });
|
|
194
|
+
this.deliveryMessage = null;
|
|
188
195
|
}
|
|
189
196
|
finally {
|
|
190
197
|
this.isLoadingPromises = false;
|
|
@@ -146,7 +146,7 @@ export class SallaRatingModalV2 {
|
|
|
146
146
|
* Show the rating modal
|
|
147
147
|
*/
|
|
148
148
|
syncStoreSettings() {
|
|
149
|
-
if (this.orderId
|
|
149
|
+
if (!this.orderId) {
|
|
150
150
|
this.orderId = salla.config.get('page.id');
|
|
151
151
|
}
|
|
152
152
|
this.allowAttachImages = !!salla.config.get('store.settings.rating.allow_attach_images');
|
|
@@ -215,15 +215,11 @@ export class SallaRatingModalV2 {
|
|
|
215
215
|
this.setUploaderProcessing(productId, !!detail.uploading);
|
|
216
216
|
this.scheduleUploaderHeightRefresh();
|
|
217
217
|
}
|
|
218
|
-
/** An eligible review with no order behind it — product-only, no store/shipping steps. */
|
|
219
|
-
isUnverifiedReview() {
|
|
220
|
-
return this.orderId === null && !!this.productId;
|
|
221
|
-
}
|
|
222
218
|
/** Encrypted order id from page config / prop — used to fetch order details. */
|
|
223
219
|
getRatingOrderId() {
|
|
224
220
|
return this.orderId || salla.config.get('page.id');
|
|
225
221
|
}
|
|
226
|
-
/** Numeric order id from API response — used when submitting ratings.
|
|
222
|
+
/** Numeric order id from API response — used when submitting ratings. */
|
|
227
223
|
getSubmitOrderId() {
|
|
228
224
|
return this.orderId;
|
|
229
225
|
}
|
|
@@ -292,9 +288,6 @@ export class SallaRatingModalV2 {
|
|
|
292
288
|
return rating !== undefined && rating !== null && rating !== '' && Number(rating) > 0;
|
|
293
289
|
}
|
|
294
290
|
isTestimonialsEnabled(order = this.order) {
|
|
295
|
-
if (this.productId) {
|
|
296
|
-
return false;
|
|
297
|
-
}
|
|
298
291
|
if (order?.testimonials_enabled === false) {
|
|
299
292
|
return false;
|
|
300
293
|
}
|
|
@@ -313,9 +306,6 @@ export class SallaRatingModalV2 {
|
|
|
313
306
|
return this.getRateableProducts(order).length > 0;
|
|
314
307
|
}
|
|
315
308
|
isShippingEnabled(order = this.order) {
|
|
316
|
-
if (this.productId) {
|
|
317
|
-
return false;
|
|
318
|
-
}
|
|
319
309
|
if (order?.shipping_enabled === false) {
|
|
320
310
|
return false;
|
|
321
311
|
}
|
|
@@ -337,8 +327,7 @@ export class SallaRatingModalV2 {
|
|
|
337
327
|
return order.products.filter(item => item?.product?.id);
|
|
338
328
|
}
|
|
339
329
|
getRateableProducts(order = this.order) {
|
|
340
|
-
return this.getOrderProducts(order).filter(item => !this.hasRatingFeedback(item?.feedback)
|
|
341
|
-
(!this.productId || String(item.product.id) === String(this.productId)));
|
|
330
|
+
return this.getOrderProducts(order).filter(item => !this.hasRatingFeedback(item?.feedback));
|
|
342
331
|
}
|
|
343
332
|
getStepsCount(order = this.order) {
|
|
344
333
|
if (!order) {
|
|
@@ -361,50 +350,6 @@ export class SallaRatingModalV2 {
|
|
|
361
350
|
this.scheduleWizardSetup = true;
|
|
362
351
|
forceUpdate(this);
|
|
363
352
|
}
|
|
364
|
-
/**
|
|
365
|
-
* Point the modal at a different order/product and invalidate any cached
|
|
366
|
-
* order so the next open() re-fetches instead of reusing stale data.
|
|
367
|
-
* Pass `orderId` as `null` for an eligible-but-unverified product review.
|
|
368
|
-
*/
|
|
369
|
-
async setOrder(orderId, productId) {
|
|
370
|
-
this.orderId = orderId;
|
|
371
|
-
this.productId = productId;
|
|
372
|
-
this.order = undefined;
|
|
373
|
-
this.hasError = false;
|
|
374
|
-
this.errorMessage = undefined;
|
|
375
|
-
this.showContactWidget = true;
|
|
376
|
-
}
|
|
377
|
-
/** Builds a single-product, order-less feedback target for unverified reviews. */
|
|
378
|
-
async loadUnverifiedProductOrder() {
|
|
379
|
-
const response = await salla.api
|
|
380
|
-
.withoutNotifier(() => salla.product.api.getDetails(this.productId))
|
|
381
|
-
.catch(() => null);
|
|
382
|
-
const product = response?.data;
|
|
383
|
-
this.order = {
|
|
384
|
-
products: [
|
|
385
|
-
{
|
|
386
|
-
feedback: undefined,
|
|
387
|
-
product: {
|
|
388
|
-
id: Number(this.productId),
|
|
389
|
-
name: product?.name || '',
|
|
390
|
-
thumbnail: product?.image?.url || salla.url.cdn('images/s-empty.png'),
|
|
391
|
-
},
|
|
392
|
-
},
|
|
393
|
-
],
|
|
394
|
-
products_enabled: true,
|
|
395
|
-
testimonials_enabled: false,
|
|
396
|
-
shipping_enabled: false,
|
|
397
|
-
thanks_message: '',
|
|
398
|
-
};
|
|
399
|
-
this.productReviewFactors = await this.fetchAllProductReviewFactors(this.order);
|
|
400
|
-
}
|
|
401
|
-
getModalTitle() {
|
|
402
|
-
if (this.isUnverifiedReview()) {
|
|
403
|
-
const productName = this.getRateableProducts()[0]?.product?.name || '';
|
|
404
|
-
return `${salla.lang.get('pages.rating.rate')} ${productName}`.trim();
|
|
405
|
-
}
|
|
406
|
-
return `${salla.lang.get('pages.rating.rate_order')} <span class="unicode">(#${this.order?.id})</span>`;
|
|
407
|
-
}
|
|
408
353
|
async open() {
|
|
409
354
|
await salla.onReady();
|
|
410
355
|
this.syncStoreSettings();
|
|
@@ -416,16 +361,14 @@ export class SallaRatingModalV2 {
|
|
|
416
361
|
this.modal
|
|
417
362
|
?.open()
|
|
418
363
|
.then(() => this.order ||
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
this.productReviewFactors = await this.fetchAllProductReviewFactors(res.data);
|
|
426
|
-
})))
|
|
364
|
+
salla.api
|
|
365
|
+
.withoutNotifier(() => salla.rating.api.order(this.getRatingOrderId()))
|
|
366
|
+
.then(async (res) => {
|
|
367
|
+
this.order = res.data;
|
|
368
|
+
this.productReviewFactors = await this.fetchAllProductReviewFactors(res.data);
|
|
369
|
+
}))
|
|
427
370
|
.then(() => this.readyUpLoyaltyPoints())
|
|
428
|
-
.then(() => this.modal?.setTitle(
|
|
371
|
+
.then(() => this.modal?.setTitle(`${salla.lang.get('pages.rating.rate_order')} <span class="unicode">(#${this.order.id})</span>`))
|
|
429
372
|
.then(() => {
|
|
430
373
|
// Initialize productImages for all products
|
|
431
374
|
const initialImages = {};
|
|
@@ -860,9 +803,7 @@ export class SallaRatingModalV2 {
|
|
|
860
803
|
Number(rating_product_with_image_points) + Number(rating_product_points);
|
|
861
804
|
}
|
|
862
805
|
loyaltyPointsNote() {
|
|
863
|
-
if (!this.loyaltyImageRatingPoints ||
|
|
864
|
-
!this.loyaltyPointsForImagesLabel ||
|
|
865
|
-
this.isUnverifiedReview()) {
|
|
806
|
+
if (!this.loyaltyImageRatingPoints || !this.loyaltyPointsForImagesLabel) {
|
|
866
807
|
return null;
|
|
867
808
|
}
|
|
868
809
|
const svgIcon = (h("svg", { width: "17", height: "17", viewBox: "0 0 17 17", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M10 0C13.6819 0 16.6667 2.98477 16.6667 6.66664C16.6667 9.37047 15.057 11.6984 12.7437 12.7444C11.6978 15.0575 9.3701 16.6666 6.66668 16.6666C2.98477 16.6666 0 13.6819 0 9.99998C0 7.29656 1.60918 4.96894 3.92195 3.92276C4.96827 1.60964 7.29618 0 10 0ZM6.66668 5C3.90524 5 1.66667 7.23856 1.66667 9.99998C1.66667 12.7614 3.90524 15 6.66668 15C9.4281 15 11.6667 12.7614 11.6667 9.99998C11.6667 7.23856 9.4281 5 6.66668 5ZM7.50002 5.83333V6.66664H9.16668V8.33331H5.83333C5.60322 8.33331 5.41667 8.51989 5.41667 8.74998C5.41667 8.95456 5.56407 9.12464 5.75844 9.15998L5.83333 9.16664H7.50002C8.6506 9.16664 9.58335 10.0994 9.58335 11.25C9.58335 12.4006 8.6506 13.3333 7.50002 13.3333V14.1666H5.83333V13.3333H4.16667V11.6666H7.50002C7.7301 11.6666 7.91668 11.4801 7.91668 11.25C7.91668 11.0455 7.76927 10.8753 7.57493 10.8401L7.50002 10.8333H5.83333C4.68274 10.8333 3.75 9.90056 3.75 8.74998C3.75 7.59939 4.68274 6.66664 5.83333 6.66664V5.83333H7.50002ZM10 1.66667C8.51377 1.66667 7.17893 2.31513 6.26313 3.34457C6.39704 3.33736 6.53138 3.33333 6.66668 3.33333C10.3486 3.33333 13.3333 6.3181 13.3333 9.99998C13.3333 10.1356 13.3293 10.2702 13.3213 10.4037C14.3513 9.48814 15 8.15314 15 6.66664C15 3.90524 12.7614 1.66667 10 1.66667Z", fill: "#008C56" })));
|
|
@@ -1403,38 +1344,19 @@ export class SallaRatingModalV2 {
|
|
|
1403
1344
|
static get properties() {
|
|
1404
1345
|
return {
|
|
1405
1346
|
"orderId": {
|
|
1406
|
-
"type": "
|
|
1347
|
+
"type": "number",
|
|
1407
1348
|
"attribute": "order-id",
|
|
1408
|
-
"mutable":
|
|
1409
|
-
"complexType": {
|
|
1410
|
-
"original": "number | string | null",
|
|
1411
|
-
"resolved": "number | string",
|
|
1412
|
-
"references": {}
|
|
1413
|
-
},
|
|
1414
|
-
"required": false,
|
|
1415
|
-
"optional": true,
|
|
1416
|
-
"docs": {
|
|
1417
|
-
"tags": [],
|
|
1418
|
-
"text": "The order id, to rate on its products & shipping.\nExplicitly `null` means an unverified (no order) product review."
|
|
1419
|
-
},
|
|
1420
|
-
"getter": false,
|
|
1421
|
-
"setter": false,
|
|
1422
|
-
"reflect": false
|
|
1423
|
-
},
|
|
1424
|
-
"productId": {
|
|
1425
|
-
"type": "any",
|
|
1426
|
-
"attribute": "product-id",
|
|
1427
|
-
"mutable": true,
|
|
1349
|
+
"mutable": false,
|
|
1428
1350
|
"complexType": {
|
|
1429
|
-
"original": "number
|
|
1430
|
-
"resolved": "number
|
|
1351
|
+
"original": "number",
|
|
1352
|
+
"resolved": "number",
|
|
1431
1353
|
"references": {}
|
|
1432
1354
|
},
|
|
1433
1355
|
"required": false,
|
|
1434
1356
|
"optional": true,
|
|
1435
1357
|
"docs": {
|
|
1436
1358
|
"tags": [],
|
|
1437
|
-
"text": ""
|
|
1359
|
+
"text": "The order id, to rate on its products & shipping"
|
|
1438
1360
|
},
|
|
1439
1361
|
"getter": false,
|
|
1440
1362
|
"setter": false,
|
|
@@ -1477,31 +1399,6 @@ export class SallaRatingModalV2 {
|
|
|
1477
1399
|
}
|
|
1478
1400
|
static get methods() {
|
|
1479
1401
|
return {
|
|
1480
|
-
"setOrder": {
|
|
1481
|
-
"complexType": {
|
|
1482
|
-
"signature": "(orderId: number | string | null, productId?: number | string) => Promise<void>",
|
|
1483
|
-
"parameters": [{
|
|
1484
|
-
"name": "orderId",
|
|
1485
|
-
"type": "string | number",
|
|
1486
|
-
"docs": ""
|
|
1487
|
-
}, {
|
|
1488
|
-
"name": "productId",
|
|
1489
|
-
"type": "string | number",
|
|
1490
|
-
"docs": ""
|
|
1491
|
-
}],
|
|
1492
|
-
"references": {
|
|
1493
|
-
"Promise": {
|
|
1494
|
-
"location": "global",
|
|
1495
|
-
"id": "global::Promise"
|
|
1496
|
-
}
|
|
1497
|
-
},
|
|
1498
|
-
"return": "Promise<void>"
|
|
1499
|
-
},
|
|
1500
|
-
"docs": {
|
|
1501
|
-
"text": "Point the modal at a different order/product and invalidate any cached\norder so the next open() re-fetches instead of reusing stale data.\nPass `orderId` as `null` for an eligible-but-unverified product review.",
|
|
1502
|
-
"tags": []
|
|
1503
|
-
}
|
|
1504
|
-
},
|
|
1505
1402
|
"open": {
|
|
1506
1403
|
"complexType": {
|
|
1507
1404
|
"signature": "() => Promise<unknown>",
|
|
@@ -24,7 +24,7 @@ export class SallaRatingModal {
|
|
|
24
24
|
this.shouldOpenDeleteModal = false;
|
|
25
25
|
this.editItem = null;
|
|
26
26
|
this.loyaltyImageRatingPoints = 0;
|
|
27
|
-
this.enableNewPopUp =
|
|
27
|
+
this.enableNewPopUp = false;
|
|
28
28
|
this.dragAndDropFilesLabel = salla.lang.get('common.uploader.drag_and_drop_files');
|
|
29
29
|
this.contactSubjectLabel = salla.lang.get('pages.rating.contact_subject');
|
|
30
30
|
this.editReviewLabel = salla.lang.get('pages.rating.edit_review');
|
|
@@ -143,19 +143,7 @@ export class SallaRatingModal {
|
|
|
143
143
|
return this.v2Ref ?? this.host.querySelector('salla-rating-modal-v2');
|
|
144
144
|
}
|
|
145
145
|
syncNewPopUpFlag() {
|
|
146
|
-
|
|
147
|
-
this.enableNewPopUp = true;
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Point the modal at a different order/product and invalidate any cached
|
|
151
|
-
* order so the next open() re-fetches instead of reusing stale data.
|
|
152
|
-
* Pass `orderId` as `null` for an eligible-but-unverified product review.
|
|
153
|
-
*/
|
|
154
|
-
async setOrder(orderId, productId) {
|
|
155
|
-
this.orderId = orderId;
|
|
156
|
-
this.productId = productId;
|
|
157
|
-
this.order = undefined;
|
|
158
|
-
await this.getV2Ref()?.setOrder(orderId, productId);
|
|
146
|
+
this.enableNewPopUp = !!salla.config.get('store.features')?.includes('new_popup_rating');
|
|
159
147
|
}
|
|
160
148
|
/**
|
|
161
149
|
* Show the rating modal
|
|
@@ -454,7 +442,7 @@ export class SallaRatingModal {
|
|
|
454
442
|
}
|
|
455
443
|
render() {
|
|
456
444
|
if (this.enableNewPopUp) {
|
|
457
|
-
return (h(Host, { class: "s-rating-modal" }, h("salla-rating-modal-v2", { ref: (el) => (this.v2Ref = el), orderId: this.orderId
|
|
445
|
+
return (h(Host, { class: "s-rating-modal" }, h("salla-rating-modal-v2", { ref: (el) => (this.v2Ref = el), orderId: this.orderId })));
|
|
458
446
|
}
|
|
459
447
|
if (this.deleteMode) {
|
|
460
448
|
return h(Host, { class: "s-rating-modal" }, this.getDeleteModal());
|
|
@@ -492,10 +480,7 @@ export class SallaRatingModal {
|
|
|
492
480
|
}
|
|
493
481
|
}
|
|
494
482
|
async componentWillLoad() {
|
|
495
|
-
salla.event.on('rating::open', (
|
|
496
|
-
const orderId = params?.orderId || salla.config.get('page.id');
|
|
497
|
-
this.setOrder(orderId, params?.productId).then(() => this.open());
|
|
498
|
-
});
|
|
483
|
+
salla.event.on('rating::open', () => this.open());
|
|
499
484
|
salla.event.on('rating::edit', (params) => this.openEditModal(params));
|
|
500
485
|
salla.event.on('rating::delete', (params) => this.openDeleteModal(params));
|
|
501
486
|
await salla.onReady();
|
|
@@ -518,38 +503,19 @@ export class SallaRatingModal {
|
|
|
518
503
|
static get properties() {
|
|
519
504
|
return {
|
|
520
505
|
"orderId": {
|
|
521
|
-
"type": "
|
|
506
|
+
"type": "number",
|
|
522
507
|
"attribute": "order-id",
|
|
523
|
-
"mutable":
|
|
508
|
+
"mutable": false,
|
|
524
509
|
"complexType": {
|
|
525
|
-
"original": "number
|
|
526
|
-
"resolved": "number
|
|
510
|
+
"original": "number",
|
|
511
|
+
"resolved": "number",
|
|
527
512
|
"references": {}
|
|
528
513
|
},
|
|
529
514
|
"required": false,
|
|
530
|
-
"optional":
|
|
515
|
+
"optional": false,
|
|
531
516
|
"docs": {
|
|
532
517
|
"tags": [],
|
|
533
|
-
"text": "The order id, to rate on its products & shipping
|
|
534
|
-
},
|
|
535
|
-
"getter": false,
|
|
536
|
-
"setter": false,
|
|
537
|
-
"reflect": false
|
|
538
|
-
},
|
|
539
|
-
"productId": {
|
|
540
|
-
"type": "any",
|
|
541
|
-
"attribute": "product-id",
|
|
542
|
-
"mutable": true,
|
|
543
|
-
"complexType": {
|
|
544
|
-
"original": "number | string",
|
|
545
|
-
"resolved": "number | string",
|
|
546
|
-
"references": {}
|
|
547
|
-
},
|
|
548
|
-
"required": false,
|
|
549
|
-
"optional": true,
|
|
550
|
-
"docs": {
|
|
551
|
-
"tags": [],
|
|
552
|
-
"text": ""
|
|
518
|
+
"text": "The order id, to rate on its products & shipping"
|
|
553
519
|
},
|
|
554
520
|
"getter": false,
|
|
555
521
|
"setter": false,
|
|
@@ -581,31 +547,6 @@ export class SallaRatingModal {
|
|
|
581
547
|
}
|
|
582
548
|
static get methods() {
|
|
583
549
|
return {
|
|
584
|
-
"setOrder": {
|
|
585
|
-
"complexType": {
|
|
586
|
-
"signature": "(orderId: number | string | null, productId?: number | string) => Promise<void>",
|
|
587
|
-
"parameters": [{
|
|
588
|
-
"name": "orderId",
|
|
589
|
-
"type": "string | number",
|
|
590
|
-
"docs": ""
|
|
591
|
-
}, {
|
|
592
|
-
"name": "productId",
|
|
593
|
-
"type": "string | number",
|
|
594
|
-
"docs": ""
|
|
595
|
-
}],
|
|
596
|
-
"references": {
|
|
597
|
-
"Promise": {
|
|
598
|
-
"location": "global",
|
|
599
|
-
"id": "global::Promise"
|
|
600
|
-
}
|
|
601
|
-
},
|
|
602
|
-
"return": "Promise<void>"
|
|
603
|
-
},
|
|
604
|
-
"docs": {
|
|
605
|
-
"text": "Point the modal at a different order/product and invalidate any cached\norder so the next open() re-fetches instead of reusing stale data.\nPass `orderId` as `null` for an eligible-but-unverified product review.",
|
|
606
|
-
"tags": []
|
|
607
|
-
}
|
|
608
|
-
},
|
|
609
550
|
"open": {
|
|
610
551
|
"complexType": {
|
|
611
552
|
"signature": "() => Promise<unknown>",
|