@salla.sa/twilight-components 2.14.546 → 2.14.548
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-CbpPZZga.js → filepond-CGA4aTUA.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-BmWPw2D9.js → filepond-plugin-file-poster-DyVz7vP9.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-De7XZguT.js → filepond-plugin-file-validate-size-CgzYDBcU.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-BHdxCuXU.js → filepond-plugin-file-validate-type-Dx2CbMZ9.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-DJZbgt5_.js → filepond-plugin-image-edit-D3aTsFmD.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-BtLJO8iG.js → filepond-plugin-image-exif-orientation-BW3usWts.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-BRUyTRh3.js → filepond-plugin-image-preview-Bb7_UNPY.js} +1 -1
- package/dist/cjs/{index-EoqYCrI-.js → index-BssNhL-x.js} +30 -26
- package/dist/cjs/{intlTelInput-CxKIlDCD.js → intlTelInput-B7QYiZ0d.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{mail-C9D8MHae.js → mail-CO8cFZH7.js} +2 -2
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +12 -5
- 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 +1 -1
- 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_8.cjs.entry.js → salla-comment-form_9.cjs.entry.js} +264 -4
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +3 -3
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +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 +208 -103
- package/dist/cjs/salla-rating-modal.cjs.entry.js +23 -8
- 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-ClshNzKX.js → vanilla-picker-H1di5S1s.js} +1 -1
- package/dist/collection/collection-manifest.json +14 -12
- package/dist/collection/components/salla-comments/interfaces.js +12 -0
- package/dist/collection/components/salla-comments/salla-comment-item.js +1 -1
- package/dist/collection/components/salla-comments/salla-comments.js +42 -5
- package/dist/collection/components/salla-modal/salla-modal.css +11 -0
- package/dist/collection/components/salla-modal/salla-modal.js +33 -6
- package/dist/collection/components/salla-rating-modal/salla-rating-modal-v2.js +253 -104
- package/dist/collection/components/salla-rating-modal/salla-rating-modal.css +34 -21
- package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +69 -10
- package/dist/collection/components/salla-rating-stars/salla-rating-stars.css +5 -0
- package/dist/collection/components/salla-verified-review/salla-verified-review.css +162 -0
- package/dist/collection/components/salla-verified-review/salla-verified-review.js +264 -0
- package/dist/components/index.js +18 -14
- package/dist/components/salla-comment-item2.js +1 -1
- package/dist/components/salla-comments.js +44 -1
- package/dist/components/salla-modal2.js +12 -4
- package/dist/components/salla-rating-modal-v22.js +208 -101
- package/dist/components/salla-rating-modal.js +1 -591
- package/dist/components/salla-rating-modal2.js +613 -0
- package/dist/components/salla-rating-stars2.js +1 -1
- package/dist/components/salla-verified-review.d.ts +11 -0
- package/dist/components/salla-verified-review.js +325 -0
- package/dist/esm/{filepond-CF5m44bJ.js → filepond-CXmbiROU.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-CcB1Ah8E.js → filepond-plugin-file-poster-DrmkMK37.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-BwVhV38u.js → filepond-plugin-file-validate-size-fRXLDtKY.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-GBCLCzPk.js → filepond-plugin-file-validate-type-9x4CtZKy.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-CrBe3Dh3.js → filepond-plugin-image-edit-BTjvSjn9.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-C2Cj5Jrc.js → filepond-plugin-image-exif-orientation-CnSOx2Lm.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-YVKQw3-Q.js → filepond-plugin-image-preview-Cy0Nd8Xr.js} +1 -1
- package/dist/esm/{index-FwRU05yW.js → index-B64o_70M.js} +30 -26
- package/dist/esm/{intlTelInput-B1_kbUW3.js → intlTelInput-FF2eKbuC.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{mail-DzAIgzdz.js → mail-DmgxDvXL.js} +2 -2
- package/dist/esm/salla-accordion-body_2.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +12 -5
- 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 +1 -1
- 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_8.entry.js → salla-comment-form_9.entry.js} +264 -5
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +3 -3
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- package/dist/esm/salla-edit-order-button.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +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 +208 -103
- package/dist/esm/salla-rating-modal.entry.js +23 -8
- 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-oTEQUNmA.js → vanilla-picker-DMNociUd.js} +1 -1
- package/dist/twilight/{p-74bee051.entry.js → p-003648b5.entry.js} +1 -1
- package/dist/twilight/{p-52f4642b.entry.js → p-04cc5898.entry.js} +1 -1
- package/dist/twilight/{p-BcYofOgx.js → p-0MyCcOKI.js} +1 -1
- package/dist/twilight/{p-71ff2062.entry.js → p-0c7bdda5.entry.js} +1 -1
- package/dist/twilight/{p-b389fa5c.entry.js → p-0dfd760b.entry.js} +1 -1
- package/dist/twilight/{p-904ca909.entry.js → p-13978ff2.entry.js} +1 -1
- package/dist/twilight/{p-d11f2263.entry.js → p-1485dedd.entry.js} +1 -1
- package/dist/twilight/{p-c4be5709.entry.js → p-1628c63c.entry.js} +1 -1
- package/dist/twilight/{p-a7346ee5.entry.js → p-177e9071.entry.js} +1 -1
- package/dist/twilight/{p-e7819b7b.entry.js → p-19b03612.entry.js} +1 -1
- package/dist/twilight/{p-df48abfb.entry.js → p-1ad71324.entry.js} +1 -1
- package/dist/twilight/{p-2dd4ddc7.entry.js → p-1ce848ab.entry.js} +1 -1
- package/dist/twilight/{p-3250ee03.entry.js → p-1edbb249.entry.js} +1 -1
- package/dist/twilight/{p-ceceeaed.entry.js → p-233b9115.entry.js} +1 -1
- package/dist/twilight/{p-a3897cf4.entry.js → p-26c750c8.entry.js} +1 -1
- package/dist/twilight/p-2ddabee9.entry.js +4 -0
- package/dist/twilight/{p-b95b3bf0.entry.js → p-2f64c3b3.entry.js} +1 -1
- package/dist/twilight/{p-682f00d1.entry.js → p-309f771b.entry.js} +1 -1
- package/dist/twilight/{p-5df95bdb.entry.js → p-37b73a97.entry.js} +1 -1
- package/dist/twilight/{p-f55eb61c.entry.js → p-3b7cbf05.entry.js} +1 -1
- package/dist/twilight/{p-1286f679.entry.js → p-3eb853f9.entry.js} +1 -1
- package/dist/twilight/{p-5cfc9f8c.entry.js → p-3f460184.entry.js} +1 -1
- package/dist/twilight/{p-e71c064e.entry.js → p-40d4ccbb.entry.js} +1 -1
- package/dist/twilight/{p-34f38efd.entry.js → p-440687a4.entry.js} +1 -1
- package/dist/twilight/{p-d8313f41.entry.js → p-441ee14a.entry.js} +1 -1
- package/dist/twilight/{p-06335f34.entry.js → p-49c7dc56.entry.js} +1 -1
- package/dist/twilight/{p-e7a672b4.entry.js → p-522fb030.entry.js} +1 -1
- package/dist/twilight/{p-b9634ee2.entry.js → p-52607d64.entry.js} +1 -1
- package/dist/twilight/{p-49117243.entry.js → p-5273dbb2.entry.js} +1 -1
- package/dist/twilight/{p-981da139.entry.js → p-55cbacd7.entry.js} +1 -1
- package/dist/twilight/{p-b0730cef.entry.js → p-569ad58b.entry.js} +1 -1
- package/dist/twilight/{p-ad30742f.entry.js → p-56e553e4.entry.js} +1 -1
- package/dist/twilight/p-5ab11313.entry.js +4 -0
- package/dist/twilight/{p-c078fb93.entry.js → p-5c9e4502.entry.js} +1 -1
- package/dist/twilight/{p-13fc84ad.entry.js → p-5f860460.entry.js} +1 -1
- package/dist/twilight/{p-7fafe29c.entry.js → p-5f9b8ada.entry.js} +1 -1
- package/dist/twilight/{p-f7b8430f.entry.js → p-602e632c.entry.js} +1 -1
- package/dist/twilight/{p-d550f1f9.entry.js → p-63a2ee05.entry.js} +1 -1
- package/dist/twilight/{p-26ae2623.entry.js → p-63acbca7.entry.js} +1 -1
- package/dist/twilight/{p-158e1872.entry.js → p-63cebaef.entry.js} +1 -1
- package/dist/twilight/{p-51add824.entry.js → p-6451e759.entry.js} +1 -1
- package/dist/twilight/{p-767d37bb.entry.js → p-647832d9.entry.js} +1 -1
- package/dist/twilight/{p-d76abd6d.entry.js → p-660a552a.entry.js} +1 -1
- package/dist/twilight/{p-6081d494.entry.js → p-66ece3d6.entry.js} +1 -1
- package/dist/twilight/{p-92175855.entry.js → p-6cd863b9.entry.js} +1 -1
- package/dist/twilight/{p-ada73e68.entry.js → p-74a1a32f.entry.js} +1 -1
- package/dist/twilight/{p-1a7b7e21.entry.js → p-74c7cc02.entry.js} +1 -1
- package/dist/twilight/{p-53184934.entry.js → p-77fa0f9f.entry.js} +1 -1
- package/dist/twilight/{p-d295757a.entry.js → p-7c2a0a8b.entry.js} +1 -1
- package/dist/twilight/{p-662a5816.entry.js → p-7ce5c2cd.entry.js} +1 -1
- package/dist/twilight/{p-dfdf96be.entry.js → p-7eca6506.entry.js} +1 -1
- package/dist/twilight/{p-b7ae6c1c.entry.js → p-840dd411.entry.js} +1 -1
- package/dist/twilight/{p-eeb89f05.entry.js → p-87227eb2.entry.js} +1 -1
- package/dist/twilight/{p-79e3d1dd.entry.js → p-897b8824.entry.js} +1 -1
- package/dist/twilight/{p-bc98ccad.entry.js → p-8e293878.entry.js} +1 -1
- package/dist/twilight/{p-87ba263e.entry.js → p-8e631629.entry.js} +1 -1
- package/dist/twilight/{p-b98fb8ae.entry.js → p-923a35da.entry.js} +1 -1
- package/dist/twilight/{p-c3208f6d.entry.js → p-971b8ff5.entry.js} +1 -1
- package/dist/twilight/p-991fa4ad.entry.js +4 -0
- package/dist/twilight/{p-cac60dea.entry.js → p-9a617c41.entry.js} +1 -1
- package/dist/twilight/{p-298b9d8a.entry.js → p-9ae25175.entry.js} +1 -1
- package/dist/twilight/{p-682dc578.entry.js → p-9dbf3ff4.entry.js} +1 -1
- package/dist/twilight/p-B64o_70M.js +5 -0
- package/dist/twilight/{p-DyxHX342.js → p-BK166pHQ.js} +1 -1
- package/dist/twilight/{p-j-4Intu2.js → p-BcGXp0zm.js} +1 -1
- package/dist/twilight/{p-B9dZFOmF.js → p-Bh11vKua.js} +1 -1
- package/dist/twilight/{p-qzPm0si4.js → p-DBnECOny.js} +2 -2
- package/dist/twilight/{p-BxHJHdpj.js → p-DWqu98fW.js} +1 -1
- package/dist/twilight/{p-DzAIgzdz.js → p-DmgxDvXL.js} +1 -1
- package/dist/twilight/{p-CiKg2aqy.js → p-DrJZdc5M.js} +1 -1
- package/dist/twilight/{p-CCPvqpeZ.js → p-GwasjFLA.js} +1 -1
- package/dist/twilight/{p-BLBFg-He.js → p-UxfFm_QX.js} +1 -1
- package/dist/twilight/{p-df069a34.entry.js → p-a0e8ca67.entry.js} +1 -1
- package/dist/twilight/{p-176b9746.entry.js → p-a5199e7d.entry.js} +1 -1
- package/dist/twilight/{p-61953ae7.entry.js → p-a7fccb9c.entry.js} +1 -1
- package/dist/twilight/{p-ae8cbf4f.entry.js → p-a867beee.entry.js} +1 -1
- package/dist/twilight/{p-65be2237.entry.js → p-ace041b9.entry.js} +1 -1
- package/dist/twilight/{p-f6493289.entry.js → p-b0500232.entry.js} +1 -1
- package/dist/twilight/{p-3446e76a.entry.js → p-b0a87a8d.entry.js} +1 -1
- package/dist/twilight/{p-55aa8c39.entry.js → p-b16264a3.entry.js} +1 -1
- package/dist/twilight/{p-718a5f9b.entry.js → p-b17c6f84.entry.js} +1 -1
- package/dist/twilight/{p-75de4995.entry.js → p-b4d47e7c.entry.js} +1 -1
- package/dist/twilight/{p-f63aecb0.entry.js → p-b4f2f280.entry.js} +1 -1
- package/dist/twilight/{p-179625fd.entry.js → p-b4fda5f4.entry.js} +1 -1
- package/dist/twilight/{p-f15f6265.entry.js → p-b8cd26a7.entry.js} +1 -1
- package/dist/twilight/{p-736e9843.entry.js → p-ba32a9d2.entry.js} +1 -1
- package/dist/twilight/{p-61ae00d6.entry.js → p-be916b5f.entry.js} +1 -1
- package/dist/twilight/{p-e2df9129.entry.js → p-c26f1183.entry.js} +1 -1
- package/dist/twilight/{p-7df2c1d5.entry.js → p-c5d1b2e4.entry.js} +1 -1
- package/dist/twilight/{p-bcf3d118.entry.js → p-c8dae54b.entry.js} +1 -1
- package/dist/twilight/{p-0fc9be21.entry.js → p-c9b1ad01.entry.js} +1 -1
- package/dist/twilight/{p-72dba918.entry.js → p-cacf3c75.entry.js} +1 -1
- package/dist/twilight/{p-2862c6bb.entry.js → p-cb02e6db.entry.js} +1 -1
- package/dist/twilight/{p-a32bad0b.entry.js → p-d0847af9.entry.js} +1 -1
- package/dist/twilight/{p-01e01e63.entry.js → p-d7e4f0f8.entry.js} +1 -1
- package/dist/twilight/{p-c2980ef7.entry.js → p-db4dc7cc.entry.js} +1 -1
- package/dist/twilight/{p-a91c674c.entry.js → p-e0f3e985.entry.js} +1 -1
- package/dist/twilight/{p-2dfd3810.entry.js → p-e354292f.entry.js} +1 -1
- package/dist/twilight/{p-110bd105.entry.js → p-e4db462b.entry.js} +1 -1
- package/dist/twilight/{p-2f6ba6f1.entry.js → p-e826d3aa.entry.js} +1 -1
- package/dist/twilight/{p-cb737c93.entry.js → p-f12f8db3.entry.js} +1 -1
- package/dist/twilight/{p-e73bab6b.entry.js → p-f99550d8.entry.js} +1 -1
- package/dist/twilight/{p-46d047ac.entry.js → p-fa0467a7.entry.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-comments/interfaces.d.ts +15 -0
- package/dist/types/components/salla-comments/salla-comments.d.ts +5 -2
- package/dist/types/components/salla-modal/salla-modal.d.ts +7 -2
- package/dist/types/components/salla-rating-modal/salla-rating-modal-v2.d.ts +20 -5
- package/dist/types/components/salla-rating-modal/salla-rating-modal.d.ts +10 -2
- package/dist/types/components/salla-verified-review/salla-verified-review.d.ts +51 -0
- package/dist/types/components.d.ts +59 -16
- package/package.json +5 -5
- package/dist/twilight/p-96826106.entry.js +0 -4
- package/dist/twilight/p-FwRU05yW.js +0 -5
- package/dist/twilight/p-cc8209fc.entry.js +0 -4
- package/dist/twilight/p-dcf9417c.entry.js +0 -4
|
@@ -128,22 +128,11 @@
|
|
|
128
128
|
.s-rating-modal-product-rating-row .s-rating-stars-label--empty, .s-rating-modal-product-rating-row .s-rating-stars-label-without-tag--empty {
|
|
129
129
|
opacity: 0;
|
|
130
130
|
}
|
|
131
|
-
.s-rating-modal-product-rating-row-main {
|
|
132
|
-
margin-bottom: 0.35rem;
|
|
133
|
-
padding: 0.5rem 0.6rem;
|
|
134
|
-
border: 1px solid #d1d5db;
|
|
135
|
-
border-radius: 0.45rem;
|
|
136
|
-
background: transparent;
|
|
137
|
-
}
|
|
138
131
|
.s-rating-modal-product-factor-name {
|
|
139
132
|
color: #5b6470;
|
|
140
133
|
font-size: 0.9rem;
|
|
141
134
|
line-height: 1.25;
|
|
142
135
|
}
|
|
143
|
-
.s-rating-modal-product-rating-row-main .s-rating-modal-product-factor-name {
|
|
144
|
-
font-size: 1rem;
|
|
145
|
-
color: #5b6470;
|
|
146
|
-
}
|
|
147
136
|
.s-rating-modal-product-factor-required {
|
|
148
137
|
color: #f87171;
|
|
149
138
|
margin-inline-start: 0.2rem;
|
|
@@ -168,10 +157,6 @@
|
|
|
168
157
|
.hidden {
|
|
169
158
|
display: none;
|
|
170
159
|
}
|
|
171
|
-
.px-3 {
|
|
172
|
-
padding-left: 0.75rem;
|
|
173
|
-
padding-right: 0.75rem;
|
|
174
|
-
}
|
|
175
160
|
.shadow {
|
|
176
161
|
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
177
162
|
--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
|
|
@@ -309,10 +294,11 @@
|
|
|
309
294
|
}
|
|
310
295
|
}
|
|
311
296
|
.s-rating-modal-rounded-icon {
|
|
312
|
-
|
|
297
|
+
position: relative;
|
|
298
|
+
margin-bottom: 0.25rem;
|
|
313
299
|
display: flex;
|
|
314
|
-
height:
|
|
315
|
-
width:
|
|
300
|
+
height: 6rem;
|
|
301
|
+
width: 6rem;
|
|
316
302
|
align-items: center;
|
|
317
303
|
justify-content: center;
|
|
318
304
|
overflow: hidden;
|
|
@@ -322,11 +308,21 @@
|
|
|
322
308
|
border-color: rgb(229 231 235 / var(--tw-border-opacity, 1));
|
|
323
309
|
}
|
|
324
310
|
.s-rating-modal-title {
|
|
325
|
-
margin-bottom:
|
|
311
|
+
margin-bottom: 0.25rem;
|
|
326
312
|
font-size: 1.125rem;
|
|
327
313
|
line-height: 1.75rem;
|
|
328
314
|
font-weight: 700;
|
|
329
315
|
}
|
|
316
|
+
.s-rating-modal-subtitle {
|
|
317
|
+
margin-bottom: 0.25rem;
|
|
318
|
+
padding-left: 0.5rem;
|
|
319
|
+
padding-right: 0.5rem;
|
|
320
|
+
text-align: center;
|
|
321
|
+
font-size: 0.875rem;
|
|
322
|
+
line-height: 1.25rem;
|
|
323
|
+
--tw-text-opacity: 1;
|
|
324
|
+
color: rgb(107 114 128 / var(--tw-text-opacity, 1));
|
|
325
|
+
}
|
|
330
326
|
.s-rating-modal-store-logo {
|
|
331
327
|
width: 4rem;
|
|
332
328
|
object-fit: contain;
|
|
@@ -505,6 +501,21 @@
|
|
|
505
501
|
--tw-text-opacity: 1;
|
|
506
502
|
color: rgb(156 163 175 / var(--tw-text-opacity, 1));
|
|
507
503
|
}
|
|
504
|
+
.s-rating-modal-product-factors-card {
|
|
505
|
+
margin-bottom: 1rem;
|
|
506
|
+
border-radius: 0.5rem;
|
|
507
|
+
--tw-bg-opacity: 1;
|
|
508
|
+
background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1));
|
|
509
|
+
padding: 1rem;
|
|
510
|
+
}
|
|
511
|
+
.s-rating-modal-product-factors-heading {
|
|
512
|
+
margin-bottom: 0.75rem;
|
|
513
|
+
font-size: 0.875rem;
|
|
514
|
+
line-height: 1.25rem;
|
|
515
|
+
font-weight: 700;
|
|
516
|
+
--tw-text-opacity: 1;
|
|
517
|
+
color: rgb(31 41 55 / var(--tw-text-opacity, 1));
|
|
518
|
+
}
|
|
508
519
|
.s-rating-modal-stars-company {
|
|
509
520
|
margin-bottom: 1.25rem;
|
|
510
521
|
}
|
|
@@ -514,8 +525,10 @@
|
|
|
514
525
|
justify-content: center;
|
|
515
526
|
gap: 0.5rem;
|
|
516
527
|
}
|
|
517
|
-
.s-rating-modal-stars-product {
|
|
518
|
-
|
|
528
|
+
.s-rating-modal-stars-product .s-rating-stars-wrapper {
|
|
529
|
+
flex-direction: column;
|
|
530
|
+
align-items: center;
|
|
531
|
+
justify-content: center;
|
|
519
532
|
}
|
|
520
533
|
.s-rating-modal-upload-count {
|
|
521
534
|
font-size: 0.875rem;
|
|
@@ -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 = true;
|
|
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,7 +143,19 @@ export class SallaRatingModal {
|
|
|
143
143
|
return this.v2Ref ?? this.host.querySelector('salla-rating-modal-v2');
|
|
144
144
|
}
|
|
145
145
|
syncNewPopUpFlag() {
|
|
146
|
-
|
|
146
|
+
// Enable the new pop-up to all consumers:
|
|
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);
|
|
147
159
|
}
|
|
148
160
|
/**
|
|
149
161
|
* Show the rating modal
|
|
@@ -442,7 +454,7 @@ export class SallaRatingModal {
|
|
|
442
454
|
}
|
|
443
455
|
render() {
|
|
444
456
|
if (this.enableNewPopUp) {
|
|
445
|
-
return (h(Host, { class: "s-rating-modal" }, h("salla-rating-modal-v2", { ref: (el) => (this.v2Ref = el), orderId: this.orderId })));
|
|
457
|
+
return (h(Host, { class: "s-rating-modal" }, h("salla-rating-modal-v2", { ref: (el) => (this.v2Ref = el), orderId: this.orderId, productId: this.productId })));
|
|
446
458
|
}
|
|
447
459
|
if (this.deleteMode) {
|
|
448
460
|
return h(Host, { class: "s-rating-modal" }, this.getDeleteModal());
|
|
@@ -480,7 +492,10 @@ export class SallaRatingModal {
|
|
|
480
492
|
}
|
|
481
493
|
}
|
|
482
494
|
async componentWillLoad() {
|
|
483
|
-
salla.event.on('rating::open', () =>
|
|
495
|
+
salla.event.on('rating::open', (params) => {
|
|
496
|
+
const orderId = params?.orderId || salla.config.get('page.id');
|
|
497
|
+
this.setOrder(orderId, params?.productId).then(() => this.open());
|
|
498
|
+
});
|
|
484
499
|
salla.event.on('rating::edit', (params) => this.openEditModal(params));
|
|
485
500
|
salla.event.on('rating::delete', (params) => this.openDeleteModal(params));
|
|
486
501
|
await salla.onReady();
|
|
@@ -503,19 +518,38 @@ export class SallaRatingModal {
|
|
|
503
518
|
static get properties() {
|
|
504
519
|
return {
|
|
505
520
|
"orderId": {
|
|
506
|
-
"type": "
|
|
521
|
+
"type": "any",
|
|
507
522
|
"attribute": "order-id",
|
|
508
|
-
"mutable":
|
|
523
|
+
"mutable": true,
|
|
509
524
|
"complexType": {
|
|
510
|
-
"original": "number",
|
|
511
|
-
"resolved": "number",
|
|
525
|
+
"original": "number | string | null",
|
|
526
|
+
"resolved": "number | string",
|
|
512
527
|
"references": {}
|
|
513
528
|
},
|
|
514
529
|
"required": false,
|
|
515
|
-
"optional":
|
|
530
|
+
"optional": true,
|
|
516
531
|
"docs": {
|
|
517
532
|
"tags": [],
|
|
518
|
-
"text": "The order id, to rate on its products & shipping"
|
|
533
|
+
"text": "The order id, to rate on its products & shipping.\nExplicitly `null` means an unverified (no order) product review."
|
|
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": ""
|
|
519
553
|
},
|
|
520
554
|
"getter": false,
|
|
521
555
|
"setter": false,
|
|
@@ -547,6 +581,31 @@ export class SallaRatingModal {
|
|
|
547
581
|
}
|
|
548
582
|
static get methods() {
|
|
549
583
|
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
|
+
},
|
|
550
609
|
"open": {
|
|
551
610
|
"complexType": {
|
|
552
611
|
"signature": "() => Promise<unknown>",
|
|
@@ -56,6 +56,11 @@
|
|
|
56
56
|
justify-content: center;
|
|
57
57
|
gap: 0.5rem;
|
|
58
58
|
}
|
|
59
|
+
.s-rating-modal-stars-product .s-rating-stars-wrapper {
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
}
|
|
59
64
|
.s-rating-stars-wrapper {
|
|
60
65
|
display: inline-flex;
|
|
61
66
|
align-items: center;
|
|
@@ -0,0 +1,162 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,264 @@
|
|
|
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
|
+
}
|