@salla.sa/twilight-components 2.14.543 → 2.14.544
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-D2YavdCs.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-Dy-GRHf0.js → filepond-plugin-file-poster-1wvhm3fc.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-BWIBGLW-.js → filepond-plugin-file-validate-size-BJQGWxdQ.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-DEVtMF0l.js → filepond-plugin-file-validate-type-Cj_4I_GJ.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-DSDoJaLw.js → filepond-plugin-image-edit-wf7RYTkL.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-BdZit5hj.js → filepond-plugin-image-exif-orientation-BPs9o0xx.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-Z3_zQyYR.js → filepond-plugin-image-preview-fGpSUIm-.js} +1 -1
- package/dist/cjs/helpers-DHdDjm5V.js +340 -0
- package/dist/cjs/{index-Bw3b6O6G.js → index-CvqLEBf0.js} +14 -14
- package/dist/cjs/{intlTelInput-CXe3TkdL.js → intlTelInput-C1wAR7s0.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-BzqeTGIZ.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-BcXR53L3.js → filepond-XV8z8Gy4.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-BTU_WzVu.js → filepond-plugin-file-poster-Ck2HvsnC.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-c_09APqP.js → filepond-plugin-file-validate-size-f2fJ8Xjg.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-Dz2Lgh8V.js → filepond-plugin-file-validate-type-BsyQIuBO.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DK7eXs2p.js → filepond-plugin-image-edit-C9m-0BT7.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-DYBURwn_.js → filepond-plugin-image-exif-orientation-BM1BifD4.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-4WNiH-ie.js → filepond-plugin-image-preview-CfJu8_cN.js} +1 -1
- package/dist/esm/helpers-BDChq2t4.js +319 -0
- package/dist/esm/{index-BW1au-Nh.js → index-Dcu3dMye.js} +14 -14
- package/dist/esm/{intlTelInput-DvPcVtVG.js → intlTelInput-jRi7Hmv8.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-DjLezF11.js} +1 -1
- package/dist/twilight/{p-3c28560f.entry.js → p-059aee01.entry.js} +1 -1
- package/dist/twilight/{p-641cc01d.entry.js → p-073a7157.entry.js} +1 -1
- package/dist/twilight/p-08a1a73f.entry.js +4 -0
- package/dist/twilight/{p-6d3a4c41.entry.js → p-0a3643ff.entry.js} +1 -1
- package/dist/twilight/{p-c7e980aa.entry.js → p-0b692ff6.entry.js} +1 -1
- package/dist/twilight/{p-d54acab0.entry.js → p-1cdc7df7.entry.js} +1 -1
- package/dist/twilight/{p-87af932a.entry.js → p-215b7413.entry.js} +1 -1
- package/dist/twilight/{p-feb80402.entry.js → p-22d83109.entry.js} +1 -1
- package/dist/twilight/{p-87cc2e08.entry.js → p-238159b4.entry.js} +1 -1
- package/dist/twilight/{p-84679cc1.entry.js → p-24c4551f.entry.js} +1 -1
- package/dist/twilight/{p-baa06c65.entry.js → p-2794bed4.entry.js} +1 -1
- package/dist/twilight/{p-9b1403fc.entry.js → p-2ab14328.entry.js} +1 -1
- package/dist/twilight/{p-80c11fae.entry.js → p-2c4142b6.entry.js} +1 -1
- package/dist/twilight/{p-50c0b6fa.entry.js → p-2c9492d1.entry.js} +1 -1
- package/dist/twilight/{p-1282e22a.entry.js → p-2df9a0f0.entry.js} +1 -1
- package/dist/twilight/{p-93c006fc.entry.js → p-3296a02a.entry.js} +1 -1
- package/dist/twilight/{p-6d6618f8.entry.js → p-34012a2c.entry.js} +1 -1
- package/dist/twilight/{p-72960bb3.entry.js → p-34a1a53d.entry.js} +1 -1
- package/dist/twilight/{p-e1eb70d2.entry.js → p-38711460.entry.js} +1 -1
- package/dist/twilight/{p-3b9dcb0f.entry.js → p-3a44eb5e.entry.js} +1 -1
- package/dist/twilight/{p-f0a04676.entry.js → p-3cead23a.entry.js} +1 -1
- package/dist/twilight/{p-3ad55c42.entry.js → p-55b6fa95.entry.js} +1 -1
- package/dist/twilight/{p-cc3a9188.entry.js → p-56582f0b.entry.js} +1 -1
- package/dist/twilight/{p-13dbbbdc.entry.js → p-5924286a.entry.js} +1 -1
- package/dist/twilight/{p-ac794ed6.entry.js → p-5b7c6098.entry.js} +1 -1
- package/dist/twilight/{p-40555637.entry.js → p-5cb5b3fd.entry.js} +1 -1
- package/dist/twilight/{p-beb2110d.entry.js → p-5e3b238a.entry.js} +1 -1
- package/dist/twilight/{p-16ccbce5.entry.js → p-5f369929.entry.js} +1 -1
- package/dist/twilight/{p-821aa95a.entry.js → p-5f710118.entry.js} +1 -1
- package/dist/twilight/{p-df202b1d.entry.js → p-623a21b4.entry.js} +1 -1
- package/dist/twilight/{p-de83979a.entry.js → p-625d6454.entry.js} +1 -1
- package/dist/twilight/{p-489d084c.entry.js → p-67abcd3f.entry.js} +1 -1
- package/dist/twilight/{p-caa8d5ae.entry.js → p-6c05a804.entry.js} +1 -1
- package/dist/twilight/{p-3cfd4fcd.entry.js → p-6c44c16d.entry.js} +1 -1
- package/dist/twilight/{p-534e7760.entry.js → p-6e5164d8.entry.js} +1 -1
- package/dist/twilight/{p-64f0c216.entry.js → p-70c4d653.entry.js} +1 -1
- package/dist/twilight/{p-280e67f0.entry.js → p-71c08a0a.entry.js} +1 -1
- package/dist/twilight/{p-e184cd72.entry.js → p-74108ca1.entry.js} +1 -1
- package/dist/twilight/{p-a4436d17.entry.js → p-75f0e895.entry.js} +1 -1
- package/dist/twilight/{p-f3f9d1fb.entry.js → p-80e5c12c.entry.js} +1 -1
- package/dist/twilight/{p-311a905b.entry.js → p-87250079.entry.js} +1 -1
- package/dist/twilight/{p-d3692caf.entry.js → p-88bf1650.entry.js} +1 -1
- package/dist/twilight/{p-aa9fb9f5.entry.js → p-8b07421d.entry.js} +1 -1
- package/dist/twilight/{p-13bf1c47.entry.js → p-8d92b009.entry.js} +1 -1
- package/dist/twilight/{p-b1dfc455.entry.js → p-8fb64951.entry.js} +1 -1
- package/dist/twilight/{p-1ba8fb02.entry.js → p-90bd015d.entry.js} +1 -1
- package/dist/twilight/{p-66c7b9e4.entry.js → p-9223db5a.entry.js} +1 -1
- package/dist/twilight/{p-c214700a.entry.js → p-93cd4a1f.entry.js} +1 -1
- package/dist/twilight/{p-16296dce.entry.js → p-969fbe80.entry.js} +1 -1
- package/dist/twilight/{p-f45f5f91.entry.js → p-9748360e.entry.js} +1 -1
- package/dist/twilight/{p-89fe5237.entry.js → p-9829a35d.entry.js} +1 -1
- package/dist/twilight/{p-edebecb3.entry.js → p-993363c6.entry.js} +1 -1
- package/dist/twilight/{p-cf4efddb.entry.js → p-99cc7bc5.entry.js} +1 -1
- package/dist/twilight/{p-68d6fa66.entry.js → p-9b9aebca.entry.js} +1 -1
- package/dist/twilight/{p-7afd066a.entry.js → p-9ddd0fac.entry.js} +1 -1
- package/dist/twilight/p-9ec8f2e5.entry.js +4 -0
- package/dist/twilight/{p-6e78ee63.entry.js → p-9f595ce2.entry.js} +1 -1
- package/dist/twilight/{p-UIEwOe70.js → p-B93RJ_yi.js} +1 -1
- package/dist/twilight/p-BDChq2t4.js +4 -0
- package/dist/twilight/{p-DPMPVhgw.js → p-BrGtlWws.js} +1 -1
- package/dist/twilight/{p-D9Y6HNvi.js → p-Bt8nb1uS.js} +1 -1
- package/dist/twilight/{p-AncUY1nn.js → p-BtKdrYj5.js} +1 -1
- package/dist/twilight/{p-CMWS1gyZ.js → p-CBemP5xi.js} +1 -1
- package/dist/twilight/{p-UDPL8zGN.js → p-CJfJMerR.js} +1 -1
- package/dist/twilight/{p-BW1au-Nh.js → p-Dcu3dMye.js} +1 -1
- package/dist/twilight/{p-C6nX89oY.js → p-DmjaYLNC.js} +1 -1
- package/dist/twilight/{p-DmgxDvXL.js → p-DzAIgzdz.js} +1 -1
- package/dist/twilight/{p-BUMDIRU5.js → p-TGGC4EhK.js} +1 -1
- package/dist/twilight/{p-e8153a9a.entry.js → p-a4c3d3e7.entry.js} +1 -1
- package/dist/twilight/{p-315890b5.entry.js → p-a78ffd28.entry.js} +1 -1
- package/dist/twilight/{p-46399dc8.entry.js → p-ace973fb.entry.js} +1 -1
- package/dist/twilight/{p-d018fc49.entry.js → p-b4aea704.entry.js} +1 -1
- package/dist/twilight/{p-ceb40475.entry.js → p-b5db2536.entry.js} +1 -1
- package/dist/twilight/{p-2a8f1ed4.entry.js → p-b61b9a75.entry.js} +1 -1
- package/dist/twilight/{p-4be8900d.entry.js → p-b7d98778.entry.js} +1 -1
- package/dist/twilight/p-b8323755.entry.js +4 -0
- package/dist/twilight/{p-664d428e.entry.js → p-bb9a2f4e.entry.js} +1 -1
- package/dist/twilight/p-bc370fba.entry.js +4 -0
- package/dist/twilight/{p-c23f7b95.entry.js → p-bf0a3c8c.entry.js} +1 -1
- package/dist/twilight/{p-07c013f9.entry.js → p-c33a1072.entry.js} +1 -1
- package/dist/twilight/{p-75065cbf.entry.js → p-c897cbe7.entry.js} +1 -1
- package/dist/twilight/{p-d7a68f6c.entry.js → p-cce7acc0.entry.js} +1 -1
- package/dist/twilight/{p-beaab93e.entry.js → p-cec395cd.entry.js} +1 -1
- package/dist/twilight/{p-26f8a482.entry.js → p-d0f0f19a.entry.js} +1 -1
- package/dist/twilight/{p-8643930a.entry.js → p-d1fccce6.entry.js} +1 -1
- package/dist/twilight/{p-362792d6.entry.js → p-d3e729ab.entry.js} +1 -1
- package/dist/twilight/{p-5335f307.entry.js → p-d6d94ebb.entry.js} +1 -1
- package/dist/twilight/{p-1187210a.entry.js → p-d72c765c.entry.js} +1 -1
- package/dist/twilight/{p-69f4a089.entry.js → p-dac4fe78.entry.js} +1 -1
- package/dist/twilight/p-ddecbb55.entry.js +4 -0
- package/dist/twilight/{p-b89d8c3c.entry.js → p-df6ce40c.entry.js} +1 -1
- package/dist/twilight/{p-a38dc391.entry.js → p-e33bfb84.entry.js} +1 -1
- package/dist/twilight/{p-65a86613.entry.js → p-e3923ba1.entry.js} +1 -1
- package/dist/twilight/{p-4b14e0f8.entry.js → p-eac3ee6a.entry.js} +1 -1
- package/dist/twilight/p-ec7efed0.entry.js +1024 -0
- package/dist/twilight/{p-a15b4245.entry.js → p-ef5bacc9.entry.js} +1 -1
- package/dist/twilight/{p-a7a10dbf.entry.js → p-ef6b8ec8.entry.js} +1 -1
- package/dist/twilight/{p-10534171.entry.js → p-eff31185.entry.js} +1 -1
- package/dist/twilight/{p-1c82117c.entry.js → p-f41a7693.entry.js} +1 -1
- package/dist/twilight/{p-bcee5564.entry.js → p-f5ea8c80.entry.js} +1 -1
- package/dist/twilight/{p-677bcf4c.entry.js → p-f929dfb2.entry.js} +1 -1
- package/dist/twilight/{p-a3fdec51.entry.js → p-fae07fdb.entry.js} +1 -1
- package/dist/twilight/{p-7adefcd6.entry.js → p-fe1c9edd.entry.js} +1 -1
- package/dist/twilight/{p-BjS2Vb6h.js → p-iAQXgb97.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-b2b818a5.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
|
@@ -11,7 +11,7 @@ import { Option } from "./components/salla-booking-field/interfaces";
|
|
|
11
11
|
import { AddressCreatedEvent, BulletDeliveryConfirmedEvent, HeaderContextUpdateEvent } from "./components/salla-bullet-delivery/interfaces";
|
|
12
12
|
import { Coupon } from "./components/salla-cart-coupons/interfaces";
|
|
13
13
|
import { Color, Options } from "./components/salla-color-picker/interfaces";
|
|
14
|
-
import { Comment,
|
|
14
|
+
import { Comment, CommentType, ReviewFactor } from "./components/salla-comments/interfaces";
|
|
15
15
|
import { CustomField } from "./components/salla-user-profile/interfaces";
|
|
16
16
|
import { DateLimit, DateOption, LocaleKey } from "./components/salla-datetime-picker/interfaces";
|
|
17
17
|
import { FilePondFile } from "./components/salla-file-upload/interfaces";
|
|
@@ -41,7 +41,7 @@ export { Option } from "./components/salla-booking-field/interfaces";
|
|
|
41
41
|
export { AddressCreatedEvent, BulletDeliveryConfirmedEvent, HeaderContextUpdateEvent } from "./components/salla-bullet-delivery/interfaces";
|
|
42
42
|
export { Coupon } from "./components/salla-cart-coupons/interfaces";
|
|
43
43
|
export { Color, Options } from "./components/salla-color-picker/interfaces";
|
|
44
|
-
export { Comment,
|
|
44
|
+
export { Comment, CommentType, ReviewFactor } from "./components/salla-comments/interfaces";
|
|
45
45
|
export { CustomField } from "./components/salla-user-profile/interfaces";
|
|
46
46
|
export { DateLimit, DateOption, LocaleKey } from "./components/salla-datetime-picker/interfaces";
|
|
47
47
|
export { FilePondFile } from "./components/salla-file-upload/interfaces";
|
|
@@ -610,7 +610,7 @@ export namespace Components {
|
|
|
610
610
|
/**
|
|
611
611
|
* Sort comments
|
|
612
612
|
*/
|
|
613
|
-
"sort": string |
|
|
613
|
+
"sort": string | 'latest' | 'oldest' | 'bottom_rating' | 'top_rating';
|
|
614
614
|
/**
|
|
615
615
|
* Determines if the comments are testimonials
|
|
616
616
|
* @default false
|
|
@@ -2786,14 +2786,9 @@ export namespace Components {
|
|
|
2786
2786
|
*/
|
|
2787
2787
|
"open": () => Promise<unknown>;
|
|
2788
2788
|
/**
|
|
2789
|
-
* The order id, to rate on its products & shipping
|
|
2789
|
+
* The order id, to rate on its products & shipping
|
|
2790
2790
|
*/
|
|
2791
|
-
"orderId"
|
|
2792
|
-
"productId"?: number | string;
|
|
2793
|
-
/**
|
|
2794
|
-
* Point the modal at a different order/product and invalidate any cached order so the next open() re-fetches instead of reusing stale data. Pass `orderId` as `null` for an eligible-but-unverified product review.
|
|
2795
|
-
*/
|
|
2796
|
-
"setOrder": (orderId: number | string | null, productId?: number | string) => Promise<void>;
|
|
2791
|
+
"orderId": number;
|
|
2797
2792
|
}
|
|
2798
2793
|
interface SallaRatingModalV2 {
|
|
2799
2794
|
/**
|
|
@@ -2804,14 +2799,9 @@ export namespace Components {
|
|
|
2804
2799
|
"openDeleteModal": (params: { feedback_id: number; }) => Promise<unknown>;
|
|
2805
2800
|
"openEditModal": (params: { type: "product" | "store" | "shipping"; feedback_id: number; }) => Promise<void>;
|
|
2806
2801
|
/**
|
|
2807
|
-
* The order id, to rate on its products & shipping
|
|
2808
|
-
*/
|
|
2809
|
-
"orderId"?: number | string | null;
|
|
2810
|
-
"productId"?: number | string;
|
|
2811
|
-
/**
|
|
2812
|
-
* Point the modal at a different order/product and invalidate any cached order so the next open() re-fetches instead of reusing stale data. Pass `orderId` as `null` for an eligible-but-unverified product review.
|
|
2802
|
+
* The order id, to rate on its products & shipping
|
|
2813
2803
|
*/
|
|
2814
|
-
"
|
|
2804
|
+
"orderId"?: number;
|
|
2815
2805
|
}
|
|
2816
2806
|
interface SallaRatingStars {
|
|
2817
2807
|
/**
|
|
@@ -3511,12 +3501,6 @@ export namespace Components {
|
|
|
3511
3501
|
}
|
|
3512
3502
|
interface SallaUserSettings {
|
|
3513
3503
|
}
|
|
3514
|
-
interface SallaVerifiedReview {
|
|
3515
|
-
/**
|
|
3516
|
-
* Product id to check purchase eligibility for. Falls back to `data-product-id` or the current page id.
|
|
3517
|
-
*/
|
|
3518
|
-
"productId"?: number | string;
|
|
3519
|
-
}
|
|
3520
3504
|
interface SallaVerify {
|
|
3521
3505
|
/**
|
|
3522
3506
|
* should auto reloading the page after success verification
|
|
@@ -5119,12 +5103,6 @@ declare global {
|
|
|
5119
5103
|
prototype: HTMLSallaUserSettingsElement;
|
|
5120
5104
|
new (): HTMLSallaUserSettingsElement;
|
|
5121
5105
|
};
|
|
5122
|
-
interface HTMLSallaVerifiedReviewElement extends Components.SallaVerifiedReview, HTMLStencilElement {
|
|
5123
|
-
}
|
|
5124
|
-
var HTMLSallaVerifiedReviewElement: {
|
|
5125
|
-
prototype: HTMLSallaVerifiedReviewElement;
|
|
5126
|
-
new (): HTMLSallaVerifiedReviewElement;
|
|
5127
|
-
};
|
|
5128
5106
|
interface HTMLSallaVerifyElementEventMap {
|
|
5129
5107
|
"verified": any;
|
|
5130
5108
|
}
|
|
@@ -5298,7 +5276,6 @@ declare global {
|
|
|
5298
5276
|
"salla-user-menu": HTMLSallaUserMenuElement;
|
|
5299
5277
|
"salla-user-profile": HTMLSallaUserProfileElement;
|
|
5300
5278
|
"salla-user-settings": HTMLSallaUserSettingsElement;
|
|
5301
|
-
"salla-verified-review": HTMLSallaVerifiedReviewElement;
|
|
5302
5279
|
"salla-verify": HTMLSallaVerifyElement;
|
|
5303
5280
|
"salla-wallet": HTMLSallaWalletElement;
|
|
5304
5281
|
"salla-wishlist-actions": HTMLSallaWishlistActionsElement;
|
|
@@ -5837,7 +5814,7 @@ declare namespace LocalJSX {
|
|
|
5837
5814
|
/**
|
|
5838
5815
|
* Sort comments
|
|
5839
5816
|
*/
|
|
5840
|
-
"sort"?: string |
|
|
5817
|
+
"sort"?: string | 'latest' | 'oldest' | 'bottom_rating' | 'top_rating';
|
|
5841
5818
|
/**
|
|
5842
5819
|
* Determines if the comments are testimonials
|
|
5843
5820
|
* @default false
|
|
@@ -7880,17 +7857,15 @@ declare namespace LocalJSX {
|
|
|
7880
7857
|
}
|
|
7881
7858
|
interface SallaRatingModal {
|
|
7882
7859
|
/**
|
|
7883
|
-
* The order id, to rate on its products & shipping
|
|
7860
|
+
* The order id, to rate on its products & shipping
|
|
7884
7861
|
*/
|
|
7885
|
-
"orderId"?: number
|
|
7886
|
-
"productId"?: number | string;
|
|
7862
|
+
"orderId"?: number;
|
|
7887
7863
|
}
|
|
7888
7864
|
interface SallaRatingModalV2 {
|
|
7889
7865
|
/**
|
|
7890
|
-
* The order id, to rate on its products & shipping
|
|
7866
|
+
* The order id, to rate on its products & shipping
|
|
7891
7867
|
*/
|
|
7892
|
-
"orderId"?: number
|
|
7893
|
-
"productId"?: number | string;
|
|
7868
|
+
"orderId"?: number;
|
|
7894
7869
|
}
|
|
7895
7870
|
interface SallaRatingStars {
|
|
7896
7871
|
/**
|
|
@@ -8521,12 +8496,6 @@ declare namespace LocalJSX {
|
|
|
8521
8496
|
}
|
|
8522
8497
|
interface SallaUserSettings {
|
|
8523
8498
|
}
|
|
8524
|
-
interface SallaVerifiedReview {
|
|
8525
|
-
/**
|
|
8526
|
-
* Product id to check purchase eligibility for. Falls back to `data-product-id` or the current page id.
|
|
8527
|
-
*/
|
|
8528
|
-
"productId"?: number | string;
|
|
8529
|
-
}
|
|
8530
8499
|
interface SallaVerify {
|
|
8531
8500
|
/**
|
|
8532
8501
|
* should auto reloading the page after success verification
|
|
@@ -8701,7 +8670,6 @@ declare namespace LocalJSX {
|
|
|
8701
8670
|
"salla-user-menu": SallaUserMenu;
|
|
8702
8671
|
"salla-user-profile": SallaUserProfile;
|
|
8703
8672
|
"salla-user-settings": SallaUserSettings;
|
|
8704
|
-
"salla-verified-review": SallaVerifiedReview;
|
|
8705
8673
|
"salla-verify": SallaVerify;
|
|
8706
8674
|
"salla-wallet": SallaWallet;
|
|
8707
8675
|
"salla-wishlist-actions": SallaWishlistActions;
|
|
@@ -8998,7 +8966,6 @@ declare module "@stencil/core" {
|
|
|
8998
8966
|
*/
|
|
8999
8967
|
"salla-user-profile": LocalJSX.SallaUserProfile & JSXBase.HTMLAttributes<HTMLSallaUserProfileElement>;
|
|
9000
8968
|
"salla-user-settings": LocalJSX.SallaUserSettings & JSXBase.HTMLAttributes<HTMLSallaUserSettingsElement>;
|
|
9001
|
-
"salla-verified-review": LocalJSX.SallaVerifiedReview & JSXBase.HTMLAttributes<HTMLSallaVerifiedReviewElement>;
|
|
9002
8969
|
"salla-verify": LocalJSX.SallaVerify & JSXBase.HTMLAttributes<HTMLSallaVerifyElement>;
|
|
9003
8970
|
"salla-wallet": LocalJSX.SallaWallet & JSXBase.HTMLAttributes<HTMLSallaWalletElement>;
|
|
9004
8971
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salla.sa/twilight-components",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.544",
|
|
4
4
|
"license": "GPL-3.0",
|
|
5
5
|
"author": "Salla Team <support@salla.dev> (https://salla.dev)",
|
|
6
6
|
"bugs": {
|
|
@@ -82,9 +82,9 @@
|
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
84
|
"@googlemaps/markerclusterer": "2.6.2",
|
|
85
|
-
"@salla.sa/applepay": "2.14.
|
|
86
|
-
"@salla.sa/twilight": "2.14.
|
|
87
|
-
"@salla.sa/twilight-tailwind-theme": "2.14.
|
|
85
|
+
"@salla.sa/applepay": "2.14.544",
|
|
86
|
+
"@salla.sa/twilight": "2.14.544",
|
|
87
|
+
"@salla.sa/twilight-tailwind-theme": "2.14.544",
|
|
88
88
|
"@salla.sa/ui-address-autocomplete-widget": "1.2.1",
|
|
89
89
|
"@salla.sa/ui-google-map-render": "1.2.1",
|
|
90
90
|
"@types/node": "^20.4.8",
|
|
@@ -105,5 +105,5 @@
|
|
|
105
105
|
"vanilla-lazyload": "^17.8.5",
|
|
106
106
|
"vanilla-picker": "^2.12.2"
|
|
107
107
|
},
|
|
108
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "b1ebfe1e5e828a2454b1631907bf21c3b51eea87"
|
|
109
109
|
}
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
/*!twlt*/salla-verified-review:empty {
|
|
2
|
-
display: none;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.s-verified-review-container {
|
|
6
|
-
position: relative;
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
gap: 1rem;
|
|
10
|
-
width: 100%;
|
|
11
|
-
margin-bottom: 0.5rem;
|
|
12
|
-
margin-top: 1.25rem;
|
|
13
|
-
padding: 1rem;
|
|
14
|
-
overflow: hidden;
|
|
15
|
-
border: 1px solid #e5e7eb;
|
|
16
|
-
border-radius: 1rem;
|
|
17
|
-
background: #fff;
|
|
18
|
-
}
|
|
19
|
-
@media (min-width: 768px) {
|
|
20
|
-
.s-verified-review-container {
|
|
21
|
-
flex-direction: row;
|
|
22
|
-
align-items: center;
|
|
23
|
-
gap: 1.25rem;
|
|
24
|
-
padding: 1.25rem;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.s-verified-review-glow {
|
|
29
|
-
pointer-events: none;
|
|
30
|
-
position: absolute;
|
|
31
|
-
top: -4rem;
|
|
32
|
-
inset-inline-end: -2.5rem;
|
|
33
|
-
width: 10rem;
|
|
34
|
-
height: 10rem;
|
|
35
|
-
border-radius: 9999px;
|
|
36
|
-
background: var(--color-primary, #008c56);
|
|
37
|
-
opacity: 0.12;
|
|
38
|
-
filter: blur(2rem);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.s-verified-review-media {
|
|
42
|
-
position: relative;
|
|
43
|
-
z-index: 1;
|
|
44
|
-
flex-shrink: 0;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.s-verified-review-image {
|
|
48
|
-
width: 72px;
|
|
49
|
-
height: 72px;
|
|
50
|
-
border-radius: 0.75rem;
|
|
51
|
-
object-fit: cover;
|
|
52
|
-
background: #f3f4f6;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.s-verified-review-content {
|
|
56
|
-
position: relative;
|
|
57
|
-
z-index: 1;
|
|
58
|
-
display: flex;
|
|
59
|
-
flex: 1;
|
|
60
|
-
flex-direction: column;
|
|
61
|
-
gap: 0.375rem;
|
|
62
|
-
min-width: 0;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.s-verified-review-meta {
|
|
66
|
-
display: flex;
|
|
67
|
-
flex-wrap: wrap;
|
|
68
|
-
align-items: center;
|
|
69
|
-
gap: 0.5rem;
|
|
70
|
-
margin-bottom: 0.25rem;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.s-verified-review-badge {
|
|
74
|
-
display: inline-flex;
|
|
75
|
-
align-items: center;
|
|
76
|
-
gap: 0.25rem;
|
|
77
|
-
padding: 0.25rem 0.625rem;
|
|
78
|
-
border-radius: 9999px;
|
|
79
|
-
background: color-mix(in srgb, var(--color-primary, #008c56) 10%, transparent);
|
|
80
|
-
color: var(--color-primary, #008c56);
|
|
81
|
-
font-size: 0.75rem;
|
|
82
|
-
font-weight: 500;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.s-verified-review-badge-icon {
|
|
86
|
-
display: inline-flex;
|
|
87
|
-
align-items: center;
|
|
88
|
-
justify-content: center;
|
|
89
|
-
width: 0.875rem;
|
|
90
|
-
height: 0.875rem;
|
|
91
|
-
}
|
|
92
|
-
.s-verified-review-badge-icon svg {
|
|
93
|
-
width: 0.875rem;
|
|
94
|
-
height: 0.875rem;
|
|
95
|
-
fill: currentColor;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.s-verified-review-order {
|
|
99
|
-
font-size: 0.75rem;
|
|
100
|
-
color: #6b7280;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.s-verified-review-title {
|
|
104
|
-
margin: 0;
|
|
105
|
-
color: #111827;
|
|
106
|
-
font-size: 1rem;
|
|
107
|
-
font-weight: 700;
|
|
108
|
-
line-height: 1.375;
|
|
109
|
-
}
|
|
110
|
-
@media (min-width: 768px) {
|
|
111
|
-
.s-verified-review-title {
|
|
112
|
-
font-size: 1.125rem;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.s-verified-review-subtitle {
|
|
117
|
-
margin: 0;
|
|
118
|
-
color: #6b7280;
|
|
119
|
-
font-size: 0.875rem;
|
|
120
|
-
line-height: 1.625;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.s-verified-review-loyalty {
|
|
124
|
-
margin: 0.125rem 0 0;
|
|
125
|
-
color: var(--color-primary, #008c56);
|
|
126
|
-
font-size: 0.875rem;
|
|
127
|
-
font-weight: 600;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.s-verified-review-actions {
|
|
131
|
-
position: relative;
|
|
132
|
-
z-index: 1;
|
|
133
|
-
flex-shrink: 0;
|
|
134
|
-
}
|
|
135
|
-
@media (min-width: 768px) {
|
|
136
|
-
.s-verified-review-actions {
|
|
137
|
-
margin-inline-start: auto;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.s-verified-review-cta {
|
|
142
|
-
width: 100%;
|
|
143
|
-
}
|
|
144
|
-
@media (min-width: 768px) {
|
|
145
|
-
.s-verified-review-cta {
|
|
146
|
-
width: auto;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.s-verified-review-rate-limit-message {
|
|
151
|
-
text-align: center;
|
|
152
|
-
color: #6b7280;
|
|
153
|
-
font-size: 0.875rem;
|
|
154
|
-
margin-top: -1rem;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.s-verified-review-rate-limit-footer {
|
|
158
|
-
margin-top: 1rem;
|
|
159
|
-
}
|
|
160
|
-
.outline {
|
|
161
|
-
outline-style: solid;
|
|
162
|
-
}
|
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
import { Host, h } from "@stencil/core";
|
|
5
|
-
import CheckCircle2 from "../../assets/svg/check-circle2.svg";
|
|
6
|
-
import Block from "../../assets/svg/block.svg";
|
|
7
|
-
export class SallaVerifiedReview {
|
|
8
|
-
constructor() {
|
|
9
|
-
this.ready = false;
|
|
10
|
-
this.eligible = false;
|
|
11
|
-
this.order = null;
|
|
12
|
-
this.productImage = '';
|
|
13
|
-
this.productImageAlt = '';
|
|
14
|
-
this.loyaltyPoints = 0;
|
|
15
|
-
this.titlePurchasedLabel = '';
|
|
16
|
-
this.titleNotPurchasedLabel = '';
|
|
17
|
-
this.subtitleLabel = '';
|
|
18
|
-
this.badgeLabel = '';
|
|
19
|
-
this.orderMetaLabel = '';
|
|
20
|
-
this.ctaLabel = '';
|
|
21
|
-
this.loyaltyLabel = '';
|
|
22
|
-
this.rateLimitMessage = '';
|
|
23
|
-
this.rateLimited = false;
|
|
24
|
-
this.rateLimitTitleLabel = '';
|
|
25
|
-
this.rateLimitDefaultMessageLabel = '';
|
|
26
|
-
this.rateLimitExitLabel = '';
|
|
27
|
-
this.resolvedProductId = null;
|
|
28
|
-
this.handleRateClick = () => {
|
|
29
|
-
if (salla.config.isGuest()) {
|
|
30
|
-
salla.event.dispatch('login::open');
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
if (!this.eligible) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
if (this.rateLimited) {
|
|
37
|
-
this.showRateLimitAlert();
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
// Verified purchases pass their order id; unverified-but-eligible reviews
|
|
41
|
-
// pass `null` so the modal submits the review without an order.
|
|
42
|
-
const orderId = this.order?.id ?? null;
|
|
43
|
-
const modal = this.ensureRatingModal();
|
|
44
|
-
requestAnimationFrame(async () => {
|
|
45
|
-
await modal.setOrder?.(orderId, this.resolvedProductId);
|
|
46
|
-
modal.open?.();
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
async componentWillLoad() {
|
|
51
|
-
try {
|
|
52
|
-
await salla.onReady();
|
|
53
|
-
await salla.lang.onLoaded();
|
|
54
|
-
await this.loadTranslations();
|
|
55
|
-
this.resolvedProductId =
|
|
56
|
-
this.productId || this.host.dataset.productId || salla.config.get('page.id');
|
|
57
|
-
if (!this.resolvedProductId) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
if (salla.config.isGuest()) {
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
salla.event.on('rating::products-rated', (_response, payload) => {
|
|
64
|
-
if (String(payload?.product_id) === String(this.resolvedProductId)) {
|
|
65
|
-
this.eligible = false;
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
await Promise.all([this.loadProductImage(), this.loadEligibility()]);
|
|
69
|
-
this.ready = true;
|
|
70
|
-
}
|
|
71
|
-
catch (e) {
|
|
72
|
-
salla?.logger?.warn?.('salla-verified-review: init failed', e);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
async loadTranslations() {
|
|
76
|
-
const setNestedAsync = (lang, key, value) => {
|
|
77
|
-
return new Promise(resolve => {
|
|
78
|
-
salla.helpers.setNested(salla.lang.messages[lang], key, value);
|
|
79
|
-
resolve(true);
|
|
80
|
-
});
|
|
81
|
-
};
|
|
82
|
-
await setNestedAsync('ar.trans', 'pages.rating.verified_review.title_purchased', 'جربت هذا المنتج؟');
|
|
83
|
-
await setNestedAsync('en.trans', 'pages.rating.verified_review.title_purchased', 'You tried this product?');
|
|
84
|
-
await setNestedAsync('ar.trans', 'pages.rating.verified_review.title_not_purchased', 'جربت هذا المنتج؟ شارك تجربتك 🎉');
|
|
85
|
-
await setNestedAsync('en.trans', 'pages.rating.verified_review.title_not_purchased', 'Tried this product? Share your experience 🎉');
|
|
86
|
-
await setNestedAsync('ar.trans', 'pages.rating.verified_review.subtitle', 'شارك رأيك وساعد غيرك يختار بثقة.');
|
|
87
|
-
await setNestedAsync('en.trans', 'pages.rating.verified_review.subtitle', 'Share your opinion and help others choose with confidence.');
|
|
88
|
-
await setNestedAsync('ar.trans', 'pages.rating.verified_review.badge', 'عملية شراء موثقة');
|
|
89
|
-
await setNestedAsync('en.trans', 'pages.rating.verified_review.badge', 'Verified purchase');
|
|
90
|
-
await setNestedAsync('ar.trans', 'pages.rating.verified_review.order_meta', 'طلب #:id');
|
|
91
|
-
await setNestedAsync('en.trans', 'pages.rating.verified_review.order_meta', 'Order #:id');
|
|
92
|
-
await setNestedAsync('ar.trans', 'pages.rating.verified_review.cta', 'تقييم المنتج');
|
|
93
|
-
await setNestedAsync('en.trans', 'pages.rating.verified_review.cta', 'Rate product');
|
|
94
|
-
await setNestedAsync('ar.trans', 'pages.rating.verified_review.loyalty_points', 'اكسب +:points نقطة ولاء بكتابة مراجعة 🏆');
|
|
95
|
-
await setNestedAsync('en.trans', 'pages.rating.verified_review.loyalty_points', '🏆 Earn +:points loyalty points by writing a review');
|
|
96
|
-
await setNestedAsync('ar.trans', 'pages.rating.rate_limit_title', 'تم تقييد حسابك');
|
|
97
|
-
await setNestedAsync('en.trans', 'pages.rating.rate_limit_title', 'Your account has been restricted');
|
|
98
|
-
await setNestedAsync('ar.trans', 'pages.rating.rate_limit_message', 'تجاوزت الحد المسموح لتقييم منتجات لم تشتريها بعد.');
|
|
99
|
-
await setNestedAsync('en.trans', 'pages.rating.rate_limit_message', "You've exceeded the allowed limit for rating products you haven't purchased yet.");
|
|
100
|
-
await setNestedAsync('ar.trans', 'pages.rating.rate_limit_exit', 'خروج');
|
|
101
|
-
await setNestedAsync('en.trans', 'pages.rating.rate_limit_exit', 'Exit');
|
|
102
|
-
this.titlePurchasedLabel = salla.lang.getWithDefault('pages.rating.verified_review.title_purchased', 'اشتريت هذا! شارك تجربتك 🎉');
|
|
103
|
-
this.titleNotPurchasedLabel = salla.lang.getWithDefault('pages.rating.verified_review.title_not_purchased', 'جربت هذا المنتج؟ شارك تجربتك 🎉');
|
|
104
|
-
this.subtitleLabel = salla.lang.getWithDefault('pages.rating.verified_review.subtitle', 'ساعد المتسوقين الآخرين بمراجعة هذا المنتج. رأيك يهم.');
|
|
105
|
-
this.badgeLabel = salla.lang.getWithDefault('pages.rating.verified_review.badge', 'عملية شراء موثقة');
|
|
106
|
-
this.orderMetaLabel = salla.lang.getWithDefault('pages.rating.verified_review.order_meta', 'طلب #:id');
|
|
107
|
-
this.ctaLabel = salla.lang.getWithDefault('pages.rating.verified_review.cta', 'قيِّم المنتج');
|
|
108
|
-
this.loyaltyLabel = salla.lang.getWithDefault('pages.rating.verified_review.loyalty_points', 'اكسب +:points نقطة ولاء بكتابة مراجعة 🏆');
|
|
109
|
-
this.rateLimitTitleLabel = salla.lang.getWithDefault('pages.rating.rate_limit_title', 'تم تقييد حسابك');
|
|
110
|
-
this.rateLimitDefaultMessageLabel = salla.lang.getWithDefault('pages.rating.rate_limit_message', 'تجاوزت الحد المسموح لتقييم منتجات لم تشتريها بعد.');
|
|
111
|
-
this.rateLimitExitLabel = salla.lang.getWithDefault('pages.rating.rate_limit_exit', 'خروج');
|
|
112
|
-
}
|
|
113
|
-
async loadProductImage() {
|
|
114
|
-
try {
|
|
115
|
-
const response = await salla.api.withoutNotifier(() => salla.product.api.getDetails(this.resolvedProductId));
|
|
116
|
-
const product = response?.data;
|
|
117
|
-
this.productImage = product?.image?.url || salla.url.cdn('images/s-empty.png');
|
|
118
|
-
this.productImageAlt = product?.image?.alt || product?.name || '';
|
|
119
|
-
}
|
|
120
|
-
catch {
|
|
121
|
-
this.productImage = salla.url.cdn('images/s-empty.png');
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
async fetchEligibility(productId) {
|
|
125
|
-
const response = await salla.api.withoutNotifier(() => salla.rating.api.productEligibility(productId));
|
|
126
|
-
return response?.data;
|
|
127
|
-
}
|
|
128
|
-
async loadEligibility() {
|
|
129
|
-
if (!this.resolvedProductId) {
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
const eligibility = await this.fetchEligibility(this.resolvedProductId);
|
|
133
|
-
if (!eligibility) {
|
|
134
|
-
this.eligible = false;
|
|
135
|
-
this.order = null;
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
this.eligible = eligibility.eligible;
|
|
139
|
-
if (eligibility.code === 'community_review_daily_limit') {
|
|
140
|
-
this.rateLimitMessage = eligibility.message || this.rateLimitDefaultMessageLabel;
|
|
141
|
-
this.rateLimited = true;
|
|
142
|
-
this.eligible = true;
|
|
143
|
-
}
|
|
144
|
-
this.order =
|
|
145
|
-
this.eligible && eligibility.order_id
|
|
146
|
-
? {
|
|
147
|
-
id: eligibility.order_id,
|
|
148
|
-
reference_id: eligibility.reference_id,
|
|
149
|
-
created_at: eligibility.created_at,
|
|
150
|
-
}
|
|
151
|
-
: null;
|
|
152
|
-
const loyaltyPoints = salla.config.get('store.settings.rating.rating_product_points');
|
|
153
|
-
this.loyaltyPoints = loyaltyPoints ? Number(loyaltyPoints) : 0;
|
|
154
|
-
}
|
|
155
|
-
getOrderMetaText() {
|
|
156
|
-
if (!this.order) {
|
|
157
|
-
return '';
|
|
158
|
-
}
|
|
159
|
-
const orderMetaLabel = this.orderMetaLabel.replace(':id', String(this.order.reference_id || this.order.id));
|
|
160
|
-
const orderCreatedAt = this.order.created_at ? new Date(this.order.created_at) : null;
|
|
161
|
-
return orderMetaLabel + (orderCreatedAt ? ` • ${this.formatOrderDate(orderCreatedAt)}` : '');
|
|
162
|
-
}
|
|
163
|
-
formatOrderDate(date) {
|
|
164
|
-
const month = date.toLocaleDateString(navigator.language, { month: 'short' });
|
|
165
|
-
const day = String(date.getDate()).padStart(2, '0');
|
|
166
|
-
return `${date.getFullYear()} ${month} ${day}`;
|
|
167
|
-
}
|
|
168
|
-
getLoyaltyText() {
|
|
169
|
-
if (!this.loyaltyPoints) {
|
|
170
|
-
return '';
|
|
171
|
-
}
|
|
172
|
-
if (!this.loyaltyLabel) {
|
|
173
|
-
this.loyaltyLabel = salla.lang.getWithDefault('pages.rating.verified_review.loyalty_points', 'اكسب +:points نقطة ولاء بكتابة مراجعة 🏆');
|
|
174
|
-
}
|
|
175
|
-
return this.loyaltyLabel.replace(':points', String(this.loyaltyPoints));
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* Shown when the shopper tries to rate a product after the eligibility
|
|
179
|
-
* check reported the community-review daily limit was hit.
|
|
180
|
-
*/
|
|
181
|
-
showRateLimitAlert() {
|
|
182
|
-
requestAnimationFrame(() => {
|
|
183
|
-
this.rateLimitModal?.setTitle?.(this.rateLimitTitleLabel);
|
|
184
|
-
this.rateLimitModal?.open?.();
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
getRateLimitModal() {
|
|
188
|
-
return (h("salla-modal", { ref: modal => (this.rateLimitModal = modal), width: "xs", centered: true }, h("span", { slot: "icon", class: "s-modal-icon s-modal-bg-normal", innerHTML: Block }), h("p", { class: "s-verified-review-rate-limit-message" }, this.rateLimitMessage), h("div", { slot: "footer", class: "s-verified-review-rate-limit-footer" }, h("salla-button", { width: "wide", fill: "outline", color: "primary", onClick: () => this.rateLimitModal?.close?.() }, this.rateLimitExitLabel))));
|
|
189
|
-
}
|
|
190
|
-
ensureRatingModal() {
|
|
191
|
-
let modal = document.querySelector('salla-rating-modal');
|
|
192
|
-
if (!modal) {
|
|
193
|
-
modal = document.createElement('salla-rating-modal');
|
|
194
|
-
document.body.appendChild(modal);
|
|
195
|
-
}
|
|
196
|
-
return modal;
|
|
197
|
-
}
|
|
198
|
-
render() {
|
|
199
|
-
if (salla.config.isGuest() || !this.ready || !this.resolvedProductId) {
|
|
200
|
-
return null;
|
|
201
|
-
}
|
|
202
|
-
if (!this.eligible) {
|
|
203
|
-
return null;
|
|
204
|
-
}
|
|
205
|
-
const title = this.order ? this.titlePurchasedLabel : this.titleNotPurchasedLabel;
|
|
206
|
-
const loyaltyText = this.order ? this.getLoyaltyText() : null;
|
|
207
|
-
const orderMeta = this.getOrderMetaText();
|
|
208
|
-
return (h(Host, null, h("div", { class: "s-verified-review-container" }, h("div", { class: "s-verified-review-glow", "aria-hidden": "true" }), h("div", { class: "s-verified-review-media" }, h("img", { class: "s-verified-review-image", src: this.productImage, alt: this.productImageAlt, width: 72, height: 72, loading: "lazy", decoding: "async" })), h("div", { class: "s-verified-review-content" }, this.order ? (h("div", { class: "s-verified-review-meta" }, h("span", { class: "s-verified-review-badge" }, h("span", { class: "s-verified-review-badge-icon", innerHTML: CheckCircle2 }), this.badgeLabel), orderMeta ? h("span", { class: "s-verified-review-order" }, orderMeta) : null)) : null, h("h3", { class: "s-verified-review-title" }, title), h("p", { class: "s-verified-review-subtitle" }, this.subtitleLabel), loyaltyText ? h("p", { class: "s-verified-review-loyalty" }, loyaltyText) : null), h("div", { class: "s-verified-review-actions" }, h("salla-button", { class: "s-verified-review-cta", fill: "outline", color: "primary", size: "medium", onClick: this.handleRateClick }, this.ctaLabel))), this.getRateLimitModal()));
|
|
209
|
-
}
|
|
210
|
-
static get is() { return "salla-verified-review"; }
|
|
211
|
-
static get originalStyleUrls() {
|
|
212
|
-
return {
|
|
213
|
-
"$": ["salla-verified-review.scss"]
|
|
214
|
-
};
|
|
215
|
-
}
|
|
216
|
-
static get styleUrls() {
|
|
217
|
-
return {
|
|
218
|
-
"$": ["salla-verified-review.css"]
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
static get properties() {
|
|
222
|
-
return {
|
|
223
|
-
"productId": {
|
|
224
|
-
"type": "any",
|
|
225
|
-
"attribute": "product-id",
|
|
226
|
-
"mutable": false,
|
|
227
|
-
"complexType": {
|
|
228
|
-
"original": "number | string",
|
|
229
|
-
"resolved": "number | string",
|
|
230
|
-
"references": {}
|
|
231
|
-
},
|
|
232
|
-
"required": false,
|
|
233
|
-
"optional": true,
|
|
234
|
-
"docs": {
|
|
235
|
-
"tags": [],
|
|
236
|
-
"text": "Product id to check purchase eligibility for.\nFalls back to `data-product-id` or the current page id."
|
|
237
|
-
},
|
|
238
|
-
"getter": false,
|
|
239
|
-
"setter": false,
|
|
240
|
-
"reflect": true
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
static get states() {
|
|
245
|
-
return {
|
|
246
|
-
"ready": {},
|
|
247
|
-
"eligible": {},
|
|
248
|
-
"order": {},
|
|
249
|
-
"productImage": {},
|
|
250
|
-
"productImageAlt": {},
|
|
251
|
-
"loyaltyPoints": {},
|
|
252
|
-
"titlePurchasedLabel": {},
|
|
253
|
-
"titleNotPurchasedLabel": {},
|
|
254
|
-
"subtitleLabel": {},
|
|
255
|
-
"badgeLabel": {},
|
|
256
|
-
"orderMetaLabel": {},
|
|
257
|
-
"ctaLabel": {},
|
|
258
|
-
"loyaltyLabel": {},
|
|
259
|
-
"rateLimitMessage": {},
|
|
260
|
-
"rateLimited": {}
|
|
261
|
-
};
|
|
262
|
-
}
|
|
263
|
-
static get elementRef() { return "host"; }
|
|
264
|
-
}
|