@salla.sa/twilight-components 2.14.488 → 2.14.490
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-05NO31dc.js → filepond-DMNwZGDe.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-BSzyn1DL.js → filepond-plugin-file-poster-CwJqn9cv.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-DJKsosMa.js → filepond-plugin-file-validate-size-D8HCq_yt.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-C0xLud1P.js → filepond-plugin-file-validate-type-DZHIztrf.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-Dq1zXDYS.js → filepond-plugin-image-edit-DtW6aab5.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-B84Q7JSN.js → filepond-plugin-image-exif-orientation-DlHuggE7.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-BaE9P79l.js → filepond-plugin-image-preview-rSt0R5Fs.js} +1 -1
- package/dist/cjs/{functions-B-_Pnqnt.js → functions-Cl4vQLXn.js} +1 -1
- package/dist/cjs/{index-f6loD1zL.js → index-CfrGmYJa.js} +17 -5
- package/dist/cjs/{index-BsvV4QQg.js → index-CrTL2nRh.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +1 -1
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-booking-field_7.cjs.entry.js +11 -11
- package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +5 -5
- 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 +45 -0
- package/dist/cjs/salla-comment-form_8.cjs.entry.js +112 -30
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-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.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
- package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-map_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.cjs.entry.js +1 -1
- package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-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_3.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-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1060 -0
- package/dist/cjs/salla-rating-modal.cjs.entry.js +38 -14
- package/dist/cjs/salla-review-factors-tags.cjs.entry.js +127 -0
- package/dist/cjs/salla-reward-action_4.cjs.entry.js +3 -3
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +6 -6
- package/dist/cjs/salla-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/salla-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +2 -2
- package/dist/cjs/salla-social.cjs.entry.js +2 -2
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +4 -4
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +3 -3
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.cjs.entry.js +2 -2
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +2 -2
- package/dist/cjs/shipping-fast-CsqEQE78.js +13 -0
- package/dist/{esm/star-ZT7ehBBk.js → cjs/star-DMzrN05M.js} +4 -2
- package/dist/cjs/{tracked-promise-We1h_qB4.js → tracked-promise-ClJBjg9o.js} +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-Ck8OFt14.js → vanilla-picker-um8NlppX.js} +1 -1
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/salla-comments/salla-comment-factors.js +76 -0
- package/dist/collection/components/salla-comments/salla-comment-item.js +20 -6
- package/dist/collection/components/salla-comments/salla-comments.css +110 -0
- package/dist/collection/components/salla-rating-modal/salla-rating-modal-v2.js +1203 -0
- package/dist/collection/components/salla-rating-modal/salla-rating-modal.css +112 -1
- package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +33 -2
- package/dist/collection/components/salla-rating-stars/salla-rating-stars.css +34 -1
- package/dist/collection/components/salla-rating-stars/salla-rating-stars.js +117 -16
- package/dist/collection/components/salla-review-factors-tags/helpers.js +86 -0
- package/dist/collection/components/salla-review-factors-tags/interfaces.js +1 -0
- package/dist/collection/components/salla-review-factors-tags/salla-review-factors-tags.css +41 -0
- package/dist/collection/components/salla-review-factors-tags/salla-review-factors-tags.js +135 -0
- package/dist/collection/components/salla-reviews/salla-reviews.js +1 -1
- package/dist/collection/components/salla-reviews-page/salla-reviews-page.js +1 -1
- package/dist/collection/components/salla-reviews-summary/salla-reviews-summary.css +60 -0
- package/dist/collection/components/salla-reviews-summary/salla-reviews-summary.js +12 -2
- package/dist/collection/components/salla-search/salla-search.js +5 -5
- package/dist/collection/components/salla-searchable-dropdown/salla-searchable-dropdown.js +4 -4
- package/dist/collection/components/salla-skeleton/salla-skeleton.js +1 -1
- package/dist/collection/components/salla-social/salla-social.js +1 -1
- package/dist/collection/components/salla-social-share/salla-social-share.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
- package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
- package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
- package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
- package/dist/collection/components/salla-wishlist-actions/salla-wishlist-actions.js +1 -1
- package/dist/components/index.js +3 -3
- package/dist/components/salla-comment-factors.d.ts +11 -0
- package/dist/components/salla-comment-factors.js +9 -0
- package/dist/components/salla-comment-factors2.js +66 -0
- package/dist/components/salla-comment-item2.js +29 -9
- package/dist/components/salla-comments.js +9 -3
- package/dist/components/salla-rating-modal-v2.d.ts +11 -0
- package/dist/components/salla-rating-modal-v2.js +9 -0
- package/dist/components/salla-rating-modal-v22.js +1149 -0
- package/dist/components/salla-rating-modal.js +49 -19
- package/dist/components/salla-rating-stars2.js +80 -17
- package/dist/components/salla-review-factors-tags.d.ts +11 -0
- package/dist/components/salla-review-factors-tags.js +149 -0
- package/dist/components/salla-reviews-page.js +1 -1
- package/dist/components/salla-reviews-summary2.js +13 -3
- package/dist/components/salla-reviews.js +1 -1
- package/dist/components/salla-search.js +5 -5
- package/dist/components/salla-searchable-dropdown2.js +4 -4
- package/dist/components/salla-skeleton2.js +1 -1
- package/dist/components/salla-social-share2.js +1 -1
- package/dist/components/salla-social.js +1 -1
- package/dist/components/salla-tab-content2.js +1 -1
- package/dist/components/salla-tab-header2.js +1 -1
- package/dist/components/salla-tabs2.js +1 -1
- package/dist/components/salla-tel-input2.js +1 -1
- package/dist/components/salla-tooltip2.js +1 -1
- package/dist/components/salla-user-settings.js +1 -1
- package/dist/components/salla-wishlist-actions.js +1 -1
- package/dist/esm/{filepond-2lHD_yVt.js → filepond-Cg7o_vnN.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-DIjVVIwh.js → filepond-plugin-file-poster-BJ1q5i_Q.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-CfcICNJA.js → filepond-plugin-file-validate-size-KAp2gG4p.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-DsvYMiJr.js → filepond-plugin-file-validate-type-D6KC6aKt.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-B7K5Ib7q.js → filepond-plugin-image-edit-CsviUA8z.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-9iz6i-up.js → filepond-plugin-image-exif-orientation-DORQxh2z.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-C89IBH1s.js → filepond-plugin-image-preview-DiN_MPtQ.js} +1 -1
- package/dist/esm/{functions-CJdqLH4P.js → functions-ChcWts7Y.js} +1 -1
- package/dist/esm/{index-K0OclOPO.js → index-DkTbP5UX.js} +17 -5
- package/dist/esm/{index-D1YskPUH.js → index-nv62Rr6s.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body_2.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +1 -1
- package/dist/esm/salla-add-product-button_5.entry.js +1 -1
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +1 -1
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-booking-field_7.entry.js +11 -11
- package/dist/esm/salla-bullet-delivery_2.entry.js +5 -5
- 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 +43 -0
- package/dist/esm/salla-comment-form_8.entry.js +112 -30
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- package/dist/esm/salla-edit-order-button.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-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.entry.js +2 -2
- package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
- package/dist/esm/salla-loyalty-panel.entry.js +3 -3
- package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-program.entry.js +3 -3
- package/dist/esm/salla-loyalty-reward.entry.js +2 -2
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-map_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.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer-modal.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-branch.entry.js +1 -1
- package/dist/esm/salla-order-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_3.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-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal-v2.entry.js +1058 -0
- package/dist/esm/salla-rating-modal.entry.js +36 -12
- package/dist/esm/salla-review-factors-tags.entry.js +125 -0
- package/dist/esm/salla-reward-action_4.entry.js +3 -3
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +6 -6
- package/dist/esm/salla-skeleton.entry.js +2 -2
- package/dist/esm/salla-slider.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +2 -2
- package/dist/esm/salla-social.entry.js +2 -2
- package/dist/esm/salla-tab-content_3.entry.js +4 -4
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +2 -2
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +5 -5
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.entry.js +2 -2
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/salla-wishlist-actions.entry.js +2 -2
- package/dist/esm/shipping-fast-lMgMt31Q.js +11 -0
- package/dist/{cjs/star-DGcH7Yso.js → esm/star-CeFAfcTv.js} +2 -4
- package/dist/esm/{tracked-promise-yWzlErXb.js → tracked-promise-BhGtlRVb.js} +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-Bwq5IBwq.js → vanilla-picker-CBI_4fLe.js} +1 -1
- package/dist/twilight/{p-997a1fdf.entry.js → p-01240db4.entry.js} +1 -1
- package/dist/twilight/{p-4df90b34.entry.js → p-01cd2407.entry.js} +1 -1
- package/dist/twilight/{p-917bae25.entry.js → p-02b365bd.entry.js} +1 -1
- package/dist/twilight/p-03ab9920.entry.js +4 -0
- package/dist/twilight/{p-1ec309ad.entry.js → p-03cc6665.entry.js} +1 -1
- package/dist/twilight/{p-416e7ea9.entry.js → p-0a32b0d6.entry.js} +1 -1
- package/dist/twilight/{p-52df99a3.entry.js → p-0de58301.entry.js} +1 -1
- package/dist/twilight/{p-c6026f2e.entry.js → p-0e0db003.entry.js} +1 -1
- package/dist/twilight/p-0f853d19.entry.js +4 -0
- package/dist/twilight/{p-0f6a9e5e.entry.js → p-0f859745.entry.js} +1 -1
- package/dist/twilight/{p-680e0dca.entry.js → p-0ff0a5cd.entry.js} +1 -1
- package/dist/twilight/{p-b2a12062.entry.js → p-111e8bd4.entry.js} +1 -1
- package/dist/twilight/{p-bd50d1c4.entry.js → p-1182a8df.entry.js} +1 -1
- package/dist/twilight/{p-eeb0e354.entry.js → p-121dc015.entry.js} +1 -1
- package/dist/twilight/{p-df6739de.entry.js → p-15bc19e7.entry.js} +1 -1
- package/dist/twilight/{p-387e06ce.entry.js → p-18dada14.entry.js} +1 -1
- package/dist/twilight/{p-c1e7fe98.entry.js → p-1a3e548c.entry.js} +1 -1
- package/dist/twilight/{p-12d485db.entry.js → p-1f43ed62.entry.js} +1 -1
- package/dist/twilight/{p-ccbf4eea.entry.js → p-2414aef5.entry.js} +1 -1
- package/dist/twilight/{p-363417b6.entry.js → p-25bfec19.entry.js} +1 -1
- package/dist/twilight/{p-8a274920.entry.js → p-26211933.entry.js} +1 -1
- package/dist/twilight/{p-f97717b9.entry.js → p-2656742a.entry.js} +1 -1
- package/dist/twilight/{p-8b45c13a.entry.js → p-26594c13.entry.js} +1 -1
- package/dist/twilight/{p-5dbdf0e7.entry.js → p-271b69a0.entry.js} +1 -1
- package/dist/twilight/{p-c01100d0.entry.js → p-27ae0022.entry.js} +1 -1
- package/dist/twilight/{p-9efc4b59.entry.js → p-28318fdf.entry.js} +1 -1
- package/dist/twilight/{p-9dc6f28e.entry.js → p-28636b6b.entry.js} +1 -1
- package/dist/twilight/{p-28eea468.entry.js → p-2b6f45d9.entry.js} +1 -1
- package/dist/twilight/{p-04612ed4.entry.js → p-2bcfed29.entry.js} +1 -1
- package/dist/twilight/{p-95c6ca83.entry.js → p-2e2d9a86.entry.js} +1 -1
- package/dist/twilight/{p-72bc40b3.entry.js → p-31c63840.entry.js} +1 -1
- package/dist/twilight/{p-8878ec9e.entry.js → p-38e6442f.entry.js} +1 -1
- package/dist/twilight/p-3956807e.entry.js +4 -0
- package/dist/twilight/{p-CJRTPVPy.js → p-495aeIVH.js} +1 -1
- package/dist/twilight/{p-c497fa37.entry.js → p-4b659dd8.entry.js} +1 -1
- package/dist/twilight/{p-5dc0f3c0.entry.js → p-51be1247.entry.js} +1 -1
- package/dist/twilight/{p-f6c20f25.entry.js → p-556550d6.entry.js} +1 -1
- package/dist/twilight/{p-507e04b3.entry.js → p-57926552.entry.js} +1 -1
- package/dist/twilight/{p-cd11cafc.entry.js → p-583b37a5.entry.js} +1 -1
- package/dist/twilight/{p-fe6e676c.entry.js → p-5932a5aa.entry.js} +1 -1
- package/dist/twilight/{p-2ea6c5c6.entry.js → p-5cd89a8e.entry.js} +1 -1
- package/dist/twilight/{p-3cee41e1.entry.js → p-6c74b5a4.entry.js} +1 -1
- package/dist/twilight/{p-8f204414.entry.js → p-7092d5e9.entry.js} +1 -1
- package/dist/twilight/{p-75345728.entry.js → p-7331a7d0.entry.js} +1 -1
- package/dist/twilight/{p-0be72b27.entry.js → p-75b9780f.entry.js} +1 -1
- package/dist/twilight/{p-44819d23.entry.js → p-75d071f5.entry.js} +1 -1
- package/dist/twilight/{p-868b6dcc.entry.js → p-78364b26.entry.js} +1 -1
- package/dist/twilight/{p-d6ace1e8.entry.js → p-7869e2b4.entry.js} +1 -1
- package/dist/twilight/{p-62e99802.entry.js → p-789ede46.entry.js} +1 -1
- package/dist/twilight/{p-168bfefc.entry.js → p-7cb04076.entry.js} +1 -1
- package/dist/twilight/{p-1abccd80.entry.js → p-7fa40598.entry.js} +1 -1
- package/dist/twilight/{p-f4b040f0.entry.js → p-8430e33c.entry.js} +1 -1
- package/dist/twilight/p-8549ed85.entry.js +4 -0
- package/dist/twilight/{p-d1b3e98b.entry.js → p-88bc9aff.entry.js} +1 -1
- package/dist/twilight/{p-8ba7b32d.entry.js → p-8d83987b.entry.js} +1 -1
- package/dist/twilight/{p-54047fdd.entry.js → p-956be35f.entry.js} +1 -1
- package/dist/twilight/{p-d5bbdd47.entry.js → p-9c27c468.entry.js} +1 -1
- package/dist/twilight/{p-4Xs3NevL.js → p-B4xPvvKC.js} +1 -1
- package/dist/twilight/{p-BgI56yKL.js → p-Bp81rq7T.js} +1 -1
- package/dist/twilight/{p-ZT7ehBBk.js → p-CeFAfcTv.js} +1 -1
- package/dist/twilight/{p-BF7QVpUp.js → p-CszkocSp.js} +2 -2
- package/dist/twilight/{p-3Yh5uCQZ.js → p-CvcP7d1k.js} +1 -1
- package/dist/twilight/{p-DTwxTvVu.js → p-D1tp_3zr.js} +1 -1
- package/dist/twilight/{p-6iwUgroX.js → p-D3lg7_WR.js} +1 -1
- package/dist/twilight/{p-Bnnviqjp.js → p-D68AOZPQ.js} +1 -1
- package/dist/twilight/{p-K0OclOPO.js → p-DkTbP5UX.js} +2 -2
- package/dist/twilight/{p-327d33c2.entry.js → p-a104a885.entry.js} +1 -1
- package/dist/twilight/{p-8b2fb172.entry.js → p-a5310ab5.entry.js} +1 -1
- package/dist/twilight/{p-30796ada.entry.js → p-ab8ffcbf.entry.js} +1 -1
- package/dist/twilight/{p-9d51f43d.entry.js → p-acf6a8f0.entry.js} +1 -1
- package/dist/twilight/{p-4bdd0eab.entry.js → p-ad8111fa.entry.js} +1 -1
- package/dist/twilight/{p-fb9f7001.entry.js → p-af41ebe4.entry.js} +1 -1
- package/dist/twilight/{p-cdfe32c9.entry.js → p-b4fc5871.entry.js} +1 -1
- package/dist/twilight/{p-f5242092.entry.js → p-b7916db2.entry.js} +1 -1
- package/dist/twilight/{p-c19cdf96.entry.js → p-b87ac43c.entry.js} +1 -1
- package/dist/twilight/{p-7cfe5dbf.entry.js → p-bdca0d7a.entry.js} +1 -1
- package/dist/twilight/{p-6e6f4879.entry.js → p-be44f2e4.entry.js} +1 -1
- package/dist/twilight/{p-18c99d79.entry.js → p-bf50723d.entry.js} +1 -1
- package/dist/twilight/{p-283b7a09.entry.js → p-c0dd76e3.entry.js} +1 -1
- package/dist/twilight/{p-7ab11977.entry.js → p-c3c9b136.entry.js} +1 -1
- package/dist/twilight/{p-cb475d27.entry.js → p-c583ab13.entry.js} +1 -1
- package/dist/twilight/p-c71a6e9c.entry.js +4 -0
- package/dist/twilight/{p-24eb59ac.entry.js → p-c774a729.entry.js} +1 -1
- package/dist/twilight/p-c80b8b30.entry.js +4 -0
- package/dist/twilight/{p-76f06b0a.entry.js → p-c9dcf28b.entry.js} +1 -1
- package/dist/twilight/{p-DZu6rifA.js → p-cUujZ85s.js} +1 -1
- package/dist/twilight/{p-5effd85b.entry.js → p-ca1c1c50.entry.js} +2 -2
- package/dist/twilight/{p-e9439252.entry.js → p-cbbfec66.entry.js} +1 -1
- package/dist/twilight/{p-3f1913e0.entry.js → p-ce0d56c1.entry.js} +1 -1
- package/dist/twilight/{p-906dfda7.entry.js → p-d0eb0e3d.entry.js} +1 -1
- package/dist/twilight/{p-7a738892.entry.js → p-d27c3758.entry.js} +1 -1
- package/dist/twilight/p-d617bb3f.entry.js +4 -0
- package/dist/twilight/{p-e30f415c.entry.js → p-d7633d87.entry.js} +1 -1
- package/dist/twilight/{p-bb7d240f.entry.js → p-d981255b.entry.js} +1 -1
- package/dist/twilight/{p-2368ab21.entry.js → p-d9e7a2a9.entry.js} +1 -1
- package/dist/twilight/{p-cb9501dc.entry.js → p-dca909c8.entry.js} +1 -1
- package/dist/twilight/{p-90976775.entry.js → p-df9267ca.entry.js} +1 -1
- package/dist/twilight/{p-44ed9315.entry.js → p-eba770b4.entry.js} +1 -1
- package/dist/twilight/{p-9cb07624.entry.js → p-ee67787c.entry.js} +1 -1
- package/dist/twilight/{p-c1b56f08.entry.js → p-f303739b.entry.js} +1 -1
- package/dist/twilight/{p-3e9bba4f.entry.js → p-f834ded2.entry.js} +1 -1
- package/dist/twilight/{p-b69cc47d.entry.js → p-f855ad35.entry.js} +1 -1
- package/dist/twilight/{p-1695dd23.entry.js → p-faf369b8.entry.js} +1 -1
- package/dist/twilight/{p-4e16be16.entry.js → p-fc26088c.entry.js} +1 -1
- package/dist/twilight/{p-BHY6Sj5y.js → p-jgiIvZFz.js} +1 -1
- package/dist/twilight/p-lMgMt31Q.js +4 -0
- package/dist/twilight/{p-BZ24UYWJ.js → p-qT0_dvbw.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-comments/interfaces.d.ts +6 -0
- package/dist/types/components/salla-comments/salla-comment-factors.d.ts +6 -0
- package/dist/types/components/salla-comments/salla-comment-item.d.ts +3 -0
- package/dist/types/components/salla-comments/salla-comments.d.ts +2 -2
- package/dist/types/components/salla-rating-modal/order-feedback-response.d.ts +32 -0
- package/dist/types/components/salla-rating-modal/salla-rating-modal-v2.d.ts +151 -0
- package/dist/types/components/salla-rating-modal/salla-rating-modal.d.ts +5 -1
- package/dist/types/components/salla-rating-stars/salla-rating-stars.d.ts +13 -0
- package/dist/types/components/salla-review-factors-tags/helpers.d.ts +16 -0
- package/dist/types/components/salla-review-factors-tags/interfaces.d.ts +17 -0
- package/dist/types/components/salla-review-factors-tags/salla-review-factors-tags.d.ts +24 -0
- package/dist/types/components/salla-reviews-summary/interfaces.d.ts +5 -0
- package/dist/types/components/salla-reviews-summary/salla-reviews-summary.d.ts +2 -0
- package/dist/types/components.d.ts +114 -2
- package/package.json +5 -5
- package/dist/twilight/p-38c82b5b.entry.js +0 -4
- package/dist/twilight/p-db3da75c.entry.js +0 -4
- package/dist/twilight/p-e10eed6e.entry.js +0 -4
- package/dist/twilight/p-e52bbc5f.entry.js +0 -4
|
@@ -3,28 +3,22 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
5
5
|
import { W as WishListIcon } from './star.js';
|
|
6
|
+
import { d as defineCustomElement$4, S as ShippingFast } from './salla-rating-modal-v22.js';
|
|
6
7
|
import { C as CheckCircle2 } from './check-circle2.js';
|
|
7
8
|
import { H as Helper } from './Helper.js';
|
|
8
9
|
import { I as ImageIcon } from './image.js';
|
|
9
10
|
import { W as WhatsappIcon } from './whatsapp2.js';
|
|
10
11
|
import { M as MailIcon } from './mail.js';
|
|
11
12
|
import { a as anime } from './anime.es.js';
|
|
12
|
-
import { d as defineCustomElement$
|
|
13
|
-
import { d as defineCustomElement$
|
|
14
|
-
import { d as defineCustomElement$
|
|
15
|
-
import { d as defineCustomElement$
|
|
16
|
-
import { d as defineCustomElement$
|
|
13
|
+
import { d as defineCustomElement$9 } from './salla-button2.js';
|
|
14
|
+
import { d as defineCustomElement$8 } from './salla-file-upload2.js';
|
|
15
|
+
import { d as defineCustomElement$7 } from './salla-loading2.js';
|
|
16
|
+
import { d as defineCustomElement$6 } from './salla-modal2.js';
|
|
17
|
+
import { d as defineCustomElement$5 } from './salla-placeholder2.js';
|
|
17
18
|
import { d as defineCustomElement$3 } from './salla-rating-stars2.js';
|
|
18
19
|
import { d as defineCustomElement$2 } from './salla-skeleton2.js';
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
22
|
-
<title>shipping-fast</title>
|
|
23
|
-
<path d="M10.667 14.667c0-0.737-0.597-1.333-1.333-1.333h-8c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h8c0.736 0 1.333-0.596 1.333-1.333zM9.333 18.667c-2.941 0-5.333 2.392-5.333 5.333s2.392 5.333 5.333 5.333 5.333-2.392 5.333-5.333-2.392-5.333-5.333-5.333zM9.333 26.667c-1.471 0-2.667-1.196-2.667-2.667s1.196-2.667 2.667-2.667 2.667 1.196 2.667 2.667-1.196 2.667-2.667 2.667zM1.333 10.667h5.333c0.736 0 1.333-0.596 1.333-1.333s-0.597-1.333-1.333-1.333h-5.333c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333zM31.123 13.103l-3.147-3.935c-1.273-1.589-3.171-2.501-5.205-2.501h-1.437c0-2.205-1.795-4-4-4h-13.333c-0.736 0-1.333 0.596-1.333 1.333s0.597 1.333 1.333 1.333h13.333c0.735 0 1.333 0.597 1.333 1.333v1.333c0 0.248 0.087 0.468 0.204 0.667-0.117 0.199-0.204 0.419-0.204 0.667v5.333c0 0.737 0.597 1.333 1.333 1.333h9.333v6.667h-1.333c-0.063 0-0.117 0.028-0.179 0.036-0.583-2.313-2.664-4.036-5.155-4.036-2.941 0-5.333 2.392-5.333 5.333s2.392 5.333 5.333 5.333c2.491 0 4.572-1.723 5.155-4.036 0.061 0.008 0.116 0.036 0.179 0.036h2.667c0.736 0 1.333-0.596 1.333-1.333v-8.399c0-0.905-0.311-1.792-0.877-2.499zM21.333 13.333v-4h1.437c1.221 0 2.36 0.547 3.124 1.501l1.997 2.499zM22.667 26.667c-1.471 0-2.667-1.196-2.667-2.667s1.196-2.667 2.667-2.667 2.667 1.196 2.667 2.667-1.196 2.667-2.667 2.667z"></path>
|
|
24
|
-
</svg>
|
|
25
|
-
`;
|
|
26
|
-
|
|
27
|
-
const sallaRatingModalCss = "";
|
|
21
|
+
const sallaRatingModalCss = ".s-rating-modal-product-details{padding-bottom:0.5rem}.s-rating-modal-comment{margin-top:0.35rem}.s-rating-modal-product{margin-bottom:1rem}.s-rating-modal-product-img{display:block;width:100%;height:100%;object-fit:cover}.s-rating-modal-product-title{font-size:0.95rem;font-weight:600;line-height:1.5;margin:0}.s-rating-modal-stars-product{margin-top:0.5rem}.s-rating-modal-product-details-main{display:flex;align-items:center;margin-bottom:0.5rem;padding-bottom:0;border-bottom:0}.s-rating-modal-product-info-row{display:flex;align-items:center;gap:0.6rem;margin-bottom:0.5rem;padding-bottom:0;border-bottom:0}.s-rating-modal-product-main-review{width:100%;text-align:right}.s-rating-modal-product-rating-rows{display:grid;gap:0.45rem;margin:0.2rem 0 0.7rem}.s-rating-modal-product-rating-row{display:flex;align-items:center;justify-content:space-between;gap:0.75rem;min-height:2rem}.s-rating-modal-product-rating-row salla-rating-stars{flex-shrink:0}.s-rating-modal-product-rating-row .s-rating-stars-wrapper{align-items:center;min-height:1.75rem}.s-rating-modal-product-rating-row .s-rating-stars-label,.s-rating-modal-product-rating-row .s-rating-stars-label-without-tag{min-width:auto;min-height:1.25rem;line-height:1.25rem;font-size:0.8rem;color:#5b6470;white-space:nowrap;text-align:end;transition:opacity 0.15s ease}.s-rating-modal-product-rating-row .s-rating-stars-label--empty,.s-rating-modal-product-rating-row .s-rating-stars-label-without-tag--empty{opacity:0}.s-rating-modal-product-rating-row-main{margin-bottom:0.35rem;padding:0.5rem 0.6rem;border:1px solid #d1d5db;border-radius:0.45rem;background:transparent}.s-rating-modal-product-factor-name{color:#5b6470;font-size:0.9rem;line-height:1.25}.s-rating-modal-product-rating-row-main .s-rating-modal-product-factor-name{font-size:1rem;color:#5b6470}.s-rating-modal-product-factor-required{color:#f87171;margin-inline-start:0.2rem}.s-rating-modal-product-img-wrap{width:5rem;min-width:5rem;height:3.5rem;flex-shrink:0;overflow:hidden;border-radius:0.375rem;background:#f3f4f6}.s-rating-modal-uploader.is-opened{height:auto !important;opacity:1 !important;overflow:visible !important;pointer-events:auto !important;margin-bottom:1rem}";
|
|
28
22
|
|
|
29
23
|
const SallaRatingModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaRatingModal extends HTMLElement {
|
|
30
24
|
constructor() {
|
|
@@ -41,6 +35,7 @@ const SallaRatingModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
|
|
|
41
35
|
this.deleteMode = false;
|
|
42
36
|
this.shouldOpenDeleteModal = false;
|
|
43
37
|
this.editItem = null;
|
|
38
|
+
this.enableNewPopUp = false;
|
|
44
39
|
this.dragAndDropFilesLabel = salla.lang.get('common.uploader.drag_and_drop_files');
|
|
45
40
|
this.contactSubjectLabel = salla.lang.get('pages.rating.contact_subject');
|
|
46
41
|
this.editReviewLabel = salla.lang.get('pages.rating.edit_review');
|
|
@@ -151,10 +146,21 @@ const SallaRatingModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
|
|
|
151
146
|
setTranslations();
|
|
152
147
|
});
|
|
153
148
|
}
|
|
149
|
+
getV2Ref() {
|
|
150
|
+
return this.v2Ref ?? this.host.querySelector('salla-rating-modal-v2');
|
|
151
|
+
}
|
|
152
|
+
syncNewPopUpFlag() {
|
|
153
|
+
this.enableNewPopUp = !!salla.config.get('store.features')?.includes('new_popup_rating');
|
|
154
|
+
}
|
|
154
155
|
/**
|
|
155
156
|
* Show the rating modal
|
|
156
157
|
*/
|
|
157
158
|
async open() {
|
|
159
|
+
await salla.onReady();
|
|
160
|
+
this.syncNewPopUpFlag();
|
|
161
|
+
if (this.enableNewPopUp) {
|
|
162
|
+
return this.getV2Ref()?.open();
|
|
163
|
+
}
|
|
158
164
|
this.defaultMode = true;
|
|
159
165
|
return new Promise((resolve) => {
|
|
160
166
|
setTimeout(() => {
|
|
@@ -184,6 +190,11 @@ const SallaRatingModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
|
|
|
184
190
|
});
|
|
185
191
|
}
|
|
186
192
|
async openEditModal(params) {
|
|
193
|
+
await salla.onReady();
|
|
194
|
+
this.syncNewPopUpFlag();
|
|
195
|
+
if (this.enableNewPopUp) {
|
|
196
|
+
return this.getV2Ref()?.openEditModal(params);
|
|
197
|
+
}
|
|
187
198
|
this.defaultMode = false;
|
|
188
199
|
this.editMode = true;
|
|
189
200
|
this.editType = params.type;
|
|
@@ -224,6 +235,11 @@ const SallaRatingModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
|
|
|
224
235
|
});
|
|
225
236
|
}
|
|
226
237
|
async openDeleteModal(params) {
|
|
238
|
+
await salla.onReady();
|
|
239
|
+
this.syncNewPopUpFlag();
|
|
240
|
+
if (this.enableNewPopUp) {
|
|
241
|
+
return this.getV2Ref()?.openDeleteModal(params);
|
|
242
|
+
}
|
|
227
243
|
this.defaultMode = false;
|
|
228
244
|
this.deleteMode = true;
|
|
229
245
|
this.deleteFeedbackId = params.feedback_id;
|
|
@@ -248,6 +264,9 @@ const SallaRatingModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
|
|
|
248
264
|
* Show the rating modal
|
|
249
265
|
*/
|
|
250
266
|
async close() {
|
|
267
|
+
if (this.enableNewPopUp) {
|
|
268
|
+
return this.getV2Ref()?.close();
|
|
269
|
+
}
|
|
251
270
|
return this.modal.close();
|
|
252
271
|
}
|
|
253
272
|
// handle wizard
|
|
@@ -411,6 +430,9 @@ const SallaRatingModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
|
|
|
411
430
|
: null, h("div", { class: "s-rating-modal-footer s-rating-modal-footer-end" }, h("salla-button", { "loader-position": 'center', onClick: () => this.editReview() }, this.editReviewLabel)))));
|
|
412
431
|
}
|
|
413
432
|
render() {
|
|
433
|
+
if (this.enableNewPopUp) {
|
|
434
|
+
return (h(Host, { class: "s-rating-modal" }, h("salla-rating-modal-v2", { ref: (el) => (this.v2Ref = el), orderId: this.orderId })));
|
|
435
|
+
}
|
|
414
436
|
if (this.deleteMode) {
|
|
415
437
|
return h(Host, { class: "s-rating-modal" }, this.getDeleteModal());
|
|
416
438
|
}
|
|
@@ -446,10 +468,12 @@ const SallaRatingModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
|
|
|
446
468
|
: h("salla-placeholder", { alignment: "center" }))));
|
|
447
469
|
}
|
|
448
470
|
}
|
|
449
|
-
componentWillLoad() {
|
|
471
|
+
async componentWillLoad() {
|
|
450
472
|
salla.event.on('rating::open', () => this.open());
|
|
451
473
|
salla.event.on('rating::edit', (params) => this.openEditModal(params));
|
|
452
474
|
salla.event.on('rating::delete', (params) => this.openDeleteModal(params));
|
|
475
|
+
await salla.onReady();
|
|
476
|
+
this.syncNewPopUpFlag();
|
|
453
477
|
}
|
|
454
478
|
componentDidLoad() {
|
|
455
479
|
salla.event.dispatch('rating::ready', this);
|
|
@@ -474,6 +498,7 @@ const SallaRatingModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaRatingMod
|
|
|
474
498
|
"editFeedbackId": [32],
|
|
475
499
|
"deleteFeedbackId": [32],
|
|
476
500
|
"editItem": [32],
|
|
501
|
+
"enableNewPopUp": [32],
|
|
477
502
|
"open": [64],
|
|
478
503
|
"close": [64]
|
|
479
504
|
}]);
|
|
@@ -481,7 +506,7 @@ function defineCustomElement$1() {
|
|
|
481
506
|
if (typeof customElements === "undefined") {
|
|
482
507
|
return;
|
|
483
508
|
}
|
|
484
|
-
const components = ["salla-rating-modal", "salla-button", "salla-file-upload", "salla-loading", "salla-modal", "salla-placeholder", "salla-rating-stars", "salla-skeleton"];
|
|
509
|
+
const components = ["salla-rating-modal", "salla-button", "salla-file-upload", "salla-loading", "salla-modal", "salla-placeholder", "salla-rating-modal-v2", "salla-rating-stars", "salla-skeleton"];
|
|
485
510
|
components.forEach(tagName => { switch (tagName) {
|
|
486
511
|
case "salla-rating-modal":
|
|
487
512
|
if (!customElements.get(tagName)) {
|
|
@@ -490,25 +515,30 @@ function defineCustomElement$1() {
|
|
|
490
515
|
break;
|
|
491
516
|
case "salla-button":
|
|
492
517
|
if (!customElements.get(tagName)) {
|
|
493
|
-
defineCustomElement$
|
|
518
|
+
defineCustomElement$9();
|
|
494
519
|
}
|
|
495
520
|
break;
|
|
496
521
|
case "salla-file-upload":
|
|
497
522
|
if (!customElements.get(tagName)) {
|
|
498
|
-
defineCustomElement$
|
|
523
|
+
defineCustomElement$8();
|
|
499
524
|
}
|
|
500
525
|
break;
|
|
501
526
|
case "salla-loading":
|
|
502
527
|
if (!customElements.get(tagName)) {
|
|
503
|
-
defineCustomElement$
|
|
528
|
+
defineCustomElement$7();
|
|
504
529
|
}
|
|
505
530
|
break;
|
|
506
531
|
case "salla-modal":
|
|
507
532
|
if (!customElements.get(tagName)) {
|
|
508
|
-
defineCustomElement$
|
|
533
|
+
defineCustomElement$6();
|
|
509
534
|
}
|
|
510
535
|
break;
|
|
511
536
|
case "salla-placeholder":
|
|
537
|
+
if (!customElements.get(tagName)) {
|
|
538
|
+
defineCustomElement$5();
|
|
539
|
+
}
|
|
540
|
+
break;
|
|
541
|
+
case "salla-rating-modal-v2":
|
|
512
542
|
if (!customElements.get(tagName)) {
|
|
513
543
|
defineCustomElement$4();
|
|
514
544
|
}
|
|
@@ -5,7 +5,7 @@ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal
|
|
|
5
5
|
import { R as Rate } from './star2.js';
|
|
6
6
|
import { H as Helper } from './Helper.js';
|
|
7
7
|
|
|
8
|
-
const sallaRatingStarsCss = "";
|
|
8
|
+
const sallaRatingStarsCss = ":host{display:inline-flex;vertical-align:middle}.s-rating-stars-wrapper{display:inline-flex;align-items:center;gap:0.5rem;min-height:1.75rem}.s-rating-stars-wrapper--with-label{min-height:1.75rem}.s-rating-stars-element{display:inline-flex;align-items:center;flex-shrink:0}.s-rating-stars-label,.s-rating-stars-label-without-tag{flex-shrink:0;min-width:5.5rem;min-height:1.25rem;line-height:1.25rem;text-align:end;transition:opacity 0.15s ease}.s-rating-stars-label--empty,.s-rating-stars-label-without-tag--empty{opacity:0}.s-rating-stars-btn-star{flex-shrink:0}";
|
|
9
9
|
|
|
10
10
|
const SallaRatingStars = /*@__PURE__*/ proxyCustomElement(class SallaRatingStars extends HTMLElement {
|
|
11
11
|
constructor() {
|
|
@@ -28,9 +28,26 @@ const SallaRatingStars = /*@__PURE__*/ proxyCustomElement(class SallaRatingStars
|
|
|
28
28
|
*/
|
|
29
29
|
this.reviews = 0;
|
|
30
30
|
/**
|
|
31
|
+
* Render the description label before the stars instead of after.
|
|
32
|
+
*/
|
|
33
|
+
this.labelBeforeStars = false;
|
|
34
|
+
/**
|
|
31
35
|
* Allows the rating to be editable.
|
|
32
36
|
*/
|
|
33
37
|
this.editable = false;
|
|
38
|
+
this.tag = true;
|
|
39
|
+
}
|
|
40
|
+
getLabelClassName() {
|
|
41
|
+
return this.tag ? 's-rating-stars-label' : 's-rating-stars-label-without-tag';
|
|
42
|
+
}
|
|
43
|
+
setLabelDisplay(text) {
|
|
44
|
+
if (!this.labelElem) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
this.labelElem.textContent = text || '\u00a0';
|
|
48
|
+
const labelClass = this.getLabelClassName();
|
|
49
|
+
this.labelElem.classList.toggle(`${labelClass}--empty`, !text);
|
|
50
|
+
this.labelElem.setAttribute('aria-hidden', text ? 'false' : 'true');
|
|
34
51
|
}
|
|
35
52
|
async componentWillLoad() {
|
|
36
53
|
await new Promise(resolve => {
|
|
@@ -54,23 +71,30 @@ const SallaRatingStars = /*@__PURE__*/ proxyCustomElement(class SallaRatingStars
|
|
|
54
71
|
});
|
|
55
72
|
}
|
|
56
73
|
initiateRating() {
|
|
57
|
-
this.host.addEventListener('click', this.handleRating
|
|
74
|
+
this.host.addEventListener('click', event => this.handleRating(event));
|
|
58
75
|
}
|
|
59
|
-
handleRating() {
|
|
76
|
+
handleRating(event) {
|
|
60
77
|
if (!this.starsElem)
|
|
61
78
|
return;
|
|
62
79
|
let activeStars = this.starsElem.querySelectorAll('.s-rating-stars-hovered');
|
|
63
80
|
let selected = activeStars[activeStars.length - 1];
|
|
81
|
+
if (!selected && event?.target instanceof HTMLElement) {
|
|
82
|
+
selected = event.target.closest('.s-rating-stars-btn-star[data-star]');
|
|
83
|
+
}
|
|
64
84
|
if (!selected)
|
|
65
85
|
return;
|
|
66
86
|
let selectedIndex = parseInt(selected.getAttribute('data-star'));
|
|
67
|
-
this.starsElem.querySelector('.rating_hidden_input').value =
|
|
68
|
-
|
|
87
|
+
this.starsElem.querySelector('.rating_hidden_input').value =
|
|
88
|
+
selectedIndex.toString();
|
|
89
|
+
this.starsElem
|
|
90
|
+
.querySelectorAll('.s-rating-stars-btn-star')
|
|
69
91
|
.forEach((star, index) => Helper.toggleElementClassIf(star, 's-rating-stars-selected', 's-rating-stars-unselected', () => index < selectedIndex));
|
|
70
92
|
this.starsElem.querySelectorAll('[aria-pressed]').forEach(star => star.removeAttribute('aria-pressed'));
|
|
71
93
|
selected.setAttribute('aria-pressed', 'true');
|
|
72
94
|
this.selectedStar = selectedIndex;
|
|
73
|
-
|
|
95
|
+
if (this.withLabel) {
|
|
96
|
+
this.setLabelDisplay(this.labels[selectedIndex - 1]);
|
|
97
|
+
}
|
|
74
98
|
}
|
|
75
99
|
triggerRatingProgrammatically(index) {
|
|
76
100
|
if (!this.starsElem)
|
|
@@ -92,11 +116,15 @@ const SallaRatingStars = /*@__PURE__*/ proxyCustomElement(class SallaRatingStars
|
|
|
92
116
|
for (let i = 0; i <= index; i++) {
|
|
93
117
|
stars[i].classList.add(hoveredClass);
|
|
94
118
|
}
|
|
95
|
-
|
|
119
|
+
if (this.withLabel) {
|
|
120
|
+
this.setLabelDisplay(this.labels[index]);
|
|
121
|
+
}
|
|
96
122
|
});
|
|
97
123
|
star.addEventListener('mouseout', () => {
|
|
98
124
|
star.classList.remove(hoveredClass);
|
|
99
|
-
|
|
125
|
+
if (this.withLabel) {
|
|
126
|
+
this.setLabelDisplay(this.selectedStar ? this.labels[this.selectedStar - 1] : '');
|
|
127
|
+
}
|
|
100
128
|
});
|
|
101
129
|
});
|
|
102
130
|
this.starsElem?.addEventListener('mouseout', () => stars.forEach(star => star.classList.remove(hoveredClass)));
|
|
@@ -115,22 +143,55 @@ const SallaRatingStars = /*@__PURE__*/ proxyCustomElement(class SallaRatingStars
|
|
|
115
143
|
}
|
|
116
144
|
return stars;
|
|
117
145
|
}
|
|
146
|
+
renderReviewLabel() {
|
|
147
|
+
if (!this.withLabel) {
|
|
148
|
+
return null;
|
|
149
|
+
}
|
|
150
|
+
const labelClass = this.getLabelClassName();
|
|
151
|
+
return (h("span", { ref: el => {
|
|
152
|
+
this.labelElem = el;
|
|
153
|
+
}, class: {
|
|
154
|
+
[labelClass]: true,
|
|
155
|
+
[`${labelClass}--empty`]: !this.reviewLabel,
|
|
156
|
+
}, "aria-hidden": !this.reviewLabel ? 'true' : 'false' }, this.reviewLabel || '\u00a0'));
|
|
157
|
+
}
|
|
158
|
+
renderStarsWrapper(starsContent) {
|
|
159
|
+
const label = this.renderReviewLabel();
|
|
160
|
+
return (h("div", { class: {
|
|
161
|
+
's-rating-stars-wrapper': true,
|
|
162
|
+
's-rating-stars-wrapper--with-label': this.withLabel,
|
|
163
|
+
's-rating-stars-wrapper--label-first': this.labelBeforeStars,
|
|
164
|
+
} }, this.labelBeforeStars ? [label, starsContent] : [starsContent, label]));
|
|
165
|
+
}
|
|
166
|
+
renderEditableStars() {
|
|
167
|
+
return (h("div", { class: "s-rating-stars-element", ref: el => (this.starsElem = el) }, h("input", { type: "hidden", class: "rating_hidden_input", name: this.name, value: "" }), [1, 2, 3, 4, 5].map(star => (h("button", { class: `s-rating-stars-btn-star s-rating-stars-` + this.size, "data-star": star }, h("span", { innerHTML: Rate }))))));
|
|
168
|
+
}
|
|
118
169
|
render() {
|
|
119
170
|
return this.translationsLoaded ? (this.host.closest('.swiper-slide')?.classList.contains('swiper-slide-duplicate')
|
|
120
171
|
? ''
|
|
121
|
-
: (h(Host, null, (this.value || this.value == 0) && !this.editable
|
|
122
|
-
|
|
123
|
-
:
|
|
124
|
-
h("div", { class: "s-rating-stars-wrapper" }, h("div", { class: "s-rating-stars-element", ref: (el) => this.starsElem = el }, h("input", { type: "hidden", class: "rating_hidden_input", name: this.name, value: "" }), [1, 2, 3, 4, 5].map(star => h("button", { class: `s-rating-stars-btn-star s-rating-stars-` + this.size, "data-star": star }, h("span", { innerHTML: Rate })))), this.withLabel && this.reviewLabel ? h("span", { class: "s-rating-stars-label" }, this.reviewLabel) : '')))) : (h(Host, null));
|
|
172
|
+
: (h(Host, null, (this.value || this.value == 0) && !this.editable
|
|
173
|
+
? this.renderStarsWrapper(this.createStars(this.value))
|
|
174
|
+
: this.renderStarsWrapper(this.renderEditableStars())))) : (h(Host, null));
|
|
125
175
|
}
|
|
126
176
|
componentDidLoad() {
|
|
127
177
|
this.initiateRating();
|
|
128
178
|
this.highlightSelectedStars();
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
179
|
+
this.syncEditableRating();
|
|
180
|
+
}
|
|
181
|
+
componentDidUpdate() {
|
|
182
|
+
this.syncEditableRating();
|
|
183
|
+
}
|
|
184
|
+
syncEditableRating() {
|
|
185
|
+
if (!this.translationsLoaded || !this.editable || !this.value || !this.starsElem) {
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
// Prefill only while untouched — don't reset after the user picks a new rating
|
|
189
|
+
if (this.selectedStar > 0) {
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
const stars = this.starsElem.querySelectorAll('.s-rating-stars-btn-star');
|
|
193
|
+
if (stars?.length && this.value >= 1 && this.value <= stars.length) {
|
|
194
|
+
this.triggerRatingProgrammatically(this.value - 1);
|
|
134
195
|
}
|
|
135
196
|
}
|
|
136
197
|
get host() { return this; }
|
|
@@ -141,7 +202,9 @@ const SallaRatingStars = /*@__PURE__*/ proxyCustomElement(class SallaRatingStars
|
|
|
141
202
|
"value": [2],
|
|
142
203
|
"reviews": [2],
|
|
143
204
|
"withLabel": [4, "with-label"],
|
|
205
|
+
"labelBeforeStars": [4, "label-before-stars"],
|
|
144
206
|
"editable": [4],
|
|
207
|
+
"tag": [4],
|
|
145
208
|
"translationsLoaded": [32],
|
|
146
209
|
"labels": [32],
|
|
147
210
|
"reviewLabel": [32],
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SallaReviewFactorsTags extends Components.SallaReviewFactorsTags, HTMLElement {}
|
|
4
|
+
export const SallaReviewFactorsTags: {
|
|
5
|
+
prototype: SallaReviewFactorsTags;
|
|
6
|
+
new (): SallaReviewFactorsTags;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
5
|
+
import { R as Rate } from './star2.js';
|
|
6
|
+
|
|
7
|
+
const CACHE_TTL = 5 * 60 * 1000;
|
|
8
|
+
const orderCache = new Map();
|
|
9
|
+
const inFlightRequests = new Map();
|
|
10
|
+
function normalizeList(value) {
|
|
11
|
+
if (!value) {
|
|
12
|
+
return [];
|
|
13
|
+
}
|
|
14
|
+
return Array.isArray(value) ? value : Object.values(value);
|
|
15
|
+
}
|
|
16
|
+
function getProductRatings(rating) {
|
|
17
|
+
if (!rating) {
|
|
18
|
+
return [];
|
|
19
|
+
}
|
|
20
|
+
return [
|
|
21
|
+
...normalizeList(rating.product),
|
|
22
|
+
...normalizeList(rating.products),
|
|
23
|
+
];
|
|
24
|
+
}
|
|
25
|
+
function extractFactors(source) {
|
|
26
|
+
if (!source) {
|
|
27
|
+
return [];
|
|
28
|
+
}
|
|
29
|
+
for (const key of ['factor_reviews', 'review_factors', 'factors']) {
|
|
30
|
+
const value = source[key];
|
|
31
|
+
if (Array.isArray(value) && value.length) {
|
|
32
|
+
return value;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return [];
|
|
36
|
+
}
|
|
37
|
+
function findProductRating(productRatings, ratingId, productId, itemId) {
|
|
38
|
+
return productRatings.find((productRating) => {
|
|
39
|
+
if (ratingId && Number(productRating.id ?? productRating.feedback_id) === Number(ratingId)) {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
if (itemId && Number(productRating.order_item_id) === Number(itemId)) {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
if (productId && Number(productRating.product_id ?? productRating.product?.id) === Number(productId)) {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
return false;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function resolveReviewFactors(order, ratingId, productId, itemId) {
|
|
52
|
+
const productRatings = getProductRatings(order?.rating);
|
|
53
|
+
const productRating = findProductRating(productRatings, ratingId, productId, itemId);
|
|
54
|
+
return extractFactors(productRating);
|
|
55
|
+
}
|
|
56
|
+
async function fetchOrder(orderId) {
|
|
57
|
+
if (!orderId) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
const cached = orderCache.get(orderId);
|
|
61
|
+
if (cached && Date.now() - cached.timestamp <= CACHE_TTL) {
|
|
62
|
+
return cached.data;
|
|
63
|
+
}
|
|
64
|
+
const pending = inFlightRequests.get(orderId);
|
|
65
|
+
if (pending) {
|
|
66
|
+
return pending;
|
|
67
|
+
}
|
|
68
|
+
const request = (async () => {
|
|
69
|
+
try {
|
|
70
|
+
const response = await salla.api.request(`orders/${orderId}`, '', 'get');
|
|
71
|
+
const data = response?.data ?? response;
|
|
72
|
+
orderCache.set(orderId, { data, timestamp: Date.now() });
|
|
73
|
+
return data;
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
orderCache.delete(orderId);
|
|
77
|
+
throw error;
|
|
78
|
+
}
|
|
79
|
+
finally {
|
|
80
|
+
inFlightRequests.delete(orderId);
|
|
81
|
+
}
|
|
82
|
+
})();
|
|
83
|
+
inFlightRequests.set(orderId, request);
|
|
84
|
+
return request;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const sallaReviewFactorsTagsCss = ":host{display:inline-flex}.s-review-factors-tags-factors{display:flex;flex-wrap:wrap;gap:0.5rem;justify-content:flex-start;margin-bottom:0.6rem}.s-review-factors-tags-factor-tag{display:inline-flex;align-items:center;gap:0.25rem;border-radius:999px;border:1px solid #e8e8e8;background:rgba(255, 255, 255, 0.3);color:#374151;font-size:0.85rem;line-height:1;padding:0.4rem 0.65rem}.s-review-factors-tags-factor-rating{font-weight:600;color:#0f6a7c}.s-review-factors-tags-factor-star{display:inline-flex;width:0.8rem;height:0.8rem;fill:#0f6a7c}.s-review-factors-tags-factor-star svg{width:100%;height:100%}";
|
|
88
|
+
|
|
89
|
+
const SallaReviewFactorsTags$1 = /*@__PURE__*/ proxyCustomElement(class SallaReviewFactorsTags extends HTMLElement {
|
|
90
|
+
constructor() {
|
|
91
|
+
super();
|
|
92
|
+
this.__registerHost();
|
|
93
|
+
this.factors = [];
|
|
94
|
+
}
|
|
95
|
+
async componentWillLoad() {
|
|
96
|
+
await salla.onReady();
|
|
97
|
+
await this.loadFactors();
|
|
98
|
+
}
|
|
99
|
+
async loadFactors() {
|
|
100
|
+
if (!this.orderId) {
|
|
101
|
+
this.factors = [];
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
try {
|
|
105
|
+
const order = await fetchOrder(this.orderId);
|
|
106
|
+
this.factors = resolveReviewFactors(order, this.ratingId, this.productId, this.itemId);
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
console.error('[salla-review-factors-tags] failed to load order rating factors', error);
|
|
110
|
+
this.factors = [];
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
renderFactorTags() {
|
|
114
|
+
const factors = this.factors || [];
|
|
115
|
+
if (!factors.length) {
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
return (h("div", { class: "s-review-factors-tags-factors" }, factors.map(factor => (h("div", { class: "s-review-factors-tags-factor-tag" }, h("span", { class: "s-review-factors-tags-factor-name" }, factor.name), h("span", { class: "s-review-factors-tags-factor-star", innerHTML: Rate }), h("span", { class: "s-review-factors-tags-factor-rating" }, factor.rating || ''))))));
|
|
119
|
+
}
|
|
120
|
+
render() {
|
|
121
|
+
return (h(Host, { key: '2645f00c58f3ecbd3b486756dd9977edc9ae66fd', class: "s-review-factors-tags-wrapper" }, this.renderFactorTags()));
|
|
122
|
+
}
|
|
123
|
+
static get style() { return sallaReviewFactorsTagsCss; }
|
|
124
|
+
}, [0, "salla-review-factors-tags", {
|
|
125
|
+
"orderId": [2, "order-id"],
|
|
126
|
+
"ratingId": [2, "rating-id"],
|
|
127
|
+
"productId": [2, "product-id"],
|
|
128
|
+
"itemId": [2, "item-id"],
|
|
129
|
+
"factors": [32]
|
|
130
|
+
}]);
|
|
131
|
+
function defineCustomElement$1() {
|
|
132
|
+
if (typeof customElements === "undefined") {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const components = ["salla-review-factors-tags"];
|
|
136
|
+
components.forEach(tagName => { switch (tagName) {
|
|
137
|
+
case "salla-review-factors-tags":
|
|
138
|
+
if (!customElements.get(tagName)) {
|
|
139
|
+
customElements.define(tagName, SallaReviewFactorsTags$1);
|
|
140
|
+
}
|
|
141
|
+
break;
|
|
142
|
+
} });
|
|
143
|
+
}
|
|
144
|
+
defineCustomElement$1();
|
|
145
|
+
|
|
146
|
+
const SallaReviewFactorsTags = SallaReviewFactorsTags$1;
|
|
147
|
+
const defineCustomElement = defineCustomElement$1;
|
|
148
|
+
|
|
149
|
+
export { SallaReviewFactorsTags, defineCustomElement };
|
|
@@ -685,7 +685,7 @@ const SallaReviewsPage$1 = /*@__PURE__*/ proxyCustomElement(class SallaReviewsPa
|
|
|
685
685
|
return options.map(option => (h("option", { key: option.value, value: option.value, selected: option.value === this.sort }, option.label)));
|
|
686
686
|
}
|
|
687
687
|
render() {
|
|
688
|
-
return (h("host", { key: '
|
|
688
|
+
return (h("host", { key: '3bb188bd0ddcff6333a47ad3821ad9f75706ac6a' }, h("div", { key: 'ae139cb0f8e4921e95c695ececc6633e79486ae0', class: "s-reviews-page-header-wrapper" }, h("h2", { key: '422bc1b53c10d0c0e87b701580e049fde71f2871', class: "s-reviews-page-title" }, this.langTitlesReviews, h("span", { key: 'd43661c7d358ba1bc99762fdd92b0c9e68a86427', class: "s-reviews-page-count" }, "(", this.langRatingReviews, ")")), h("div", { key: '3255662d8c1895bf640ae02e480a1c597e37ff87', class: "s-reviews-page-filter-wrapper" }, h("label", { key: 'c2d02265c6adde573a9e282380e670ed2926e68a', class: "s-reviews-page-filter-label", htmlFor: "testimonials-filter" }, this.langSorting), h("select", { key: '67de9329c56bd70740e66c3c119a6396ce1c6006', onChange: (e) => this.handleSorting(e), disabled: !this.reviews.length, class: "s-reviews-page-filter" }, this.renderSortingOptions()))), this.reviews.length ? h("main", { class: "s-reviews-page-grid", ref: el => {
|
|
689
689
|
this.wrapper = el;
|
|
690
690
|
} }, this.reviews.map(review => (h("salla-review-card", { key: review.id, review: review }))))
|
|
691
691
|
: h("div", { class: "s-products-list-placeholder" }, h("span", { innerHTML: ShoppingBag }), h("p", null, this.placeholderText)), this.pagination?.links?.next && this.reviews.length ? (h("div", { class: "s-reviews-page-load-more-container" }, h("salla-button", { class: "s-reviews-page-load-more-btn", loading: this.isLoading, onClick: () => this.infiniteScroll?.loadNextPage(), onKeyUp: () => this.infiniteScroll?.loadNextPage() }, this.langLoadMore))) : null));
|
|
@@ -6,7 +6,7 @@ import { R as Rate } from './star2.js';
|
|
|
6
6
|
import { d as defineCustomElement$2 } from './salla-progress-bar2.js';
|
|
7
7
|
import { d as defineCustomElement$1 } from './salla-rating-stars2.js';
|
|
8
8
|
|
|
9
|
-
const sallaReviewsSummaryCss = ":host{display:block}";
|
|
9
|
+
const sallaReviewsSummaryCss = ":host{display:block}.s-reviews-summary-overall-section{display:flex;flex-direction:column;align-items:flex-start;gap:0.35rem;padding:0 0.5rem}.s-reviews-summary-overall-label{color:#111827;font-size:1.15rem;font-weight:600;line-height:1.3;margin-bottom:0.75rem}.s-reviews-summary-overall-row{display:inline-flex;align-items:flex-start;gap:0.7rem}.s-reviews-summary-factors{display:flex;flex-wrap:wrap;gap:0.5rem;justify-content:flex-start;margin-bottom:0.6rem}.s-reviews-summary-factor-tag{display:inline-flex;align-items:center;gap:0.25rem;border-radius:999px;border:1px solid #e8e8e8;background:rgba(255, 255, 255, 0.3);color:#374151;font-size:0.85rem;line-height:1;padding:0.4rem 0.65rem}.s-reviews-summary-factor-rating{font-weight:600;color:#0f6a7c}.s-reviews-summary-factor-star{display:inline-flex;width:0.8rem;height:0.8rem;fill:#0f6a7c}.s-reviews-summary-factor-star svg{width:100%;height:100%}";
|
|
10
10
|
|
|
11
11
|
const SallaReviewsSummary = /*@__PURE__*/ proxyCustomElement(class SallaReviewsSummary extends HTMLElement {
|
|
12
12
|
constructor() {
|
|
@@ -40,10 +40,12 @@ const SallaReviewsSummary = /*@__PURE__*/ proxyCustomElement(class SallaReviewsS
|
|
|
40
40
|
return Salla.lang.onLoaded(() => {
|
|
41
41
|
Salla.lang.addBulk({
|
|
42
42
|
"blocks.comments.based_on": { ar: "بناءً على", en: "Based on" },
|
|
43
|
-
"blocks.comments.recommended": { ar: "أوصوا بالمنتج", en: "Recommended" }
|
|
43
|
+
"blocks.comments.recommended": { ar: "أوصوا بالمنتج", en: "Recommended" },
|
|
44
|
+
"blocks.comments.overall_rating": { ar: "التقييم العام", en: "Overall rating" }
|
|
44
45
|
});
|
|
45
46
|
this.basedOnLabel = salla.lang.get('blocks.comments.based_on');
|
|
46
47
|
this.recommendedLabel = salla.lang.get('blocks.comments.recommended');
|
|
48
|
+
this.overallRatingLabel = salla.lang.get('blocks.comments.overall_rating');
|
|
47
49
|
});
|
|
48
50
|
}
|
|
49
51
|
async loadSummary() {
|
|
@@ -67,6 +69,13 @@ const SallaReviewsSummary = /*@__PURE__*/ proxyCustomElement(class SallaReviewsS
|
|
|
67
69
|
console.error('Error loading reviews summary:', error);
|
|
68
70
|
}
|
|
69
71
|
}
|
|
72
|
+
renderFactorTags() {
|
|
73
|
+
const factors = this.data?.factors || [];
|
|
74
|
+
if (!factors.length) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
return (h("div", { class: "s-reviews-summary-factors" }, factors.map(factor => (h("div", { class: "s-reviews-summary-factor-tag" }, h("span", { class: "s-reviews-summary-factor-name" }, factor.name), h("span", { class: "s-reviews-summary-factor-star", innerHTML: Rate }), h("span", { class: "s-reviews-summary-factor-rating" }, factor.rating || ''))))));
|
|
78
|
+
}
|
|
70
79
|
renderRecommendation() {
|
|
71
80
|
if (!this.showRecommendation || !this.data?.recommendation) {
|
|
72
81
|
return null;
|
|
@@ -94,7 +103,7 @@ const SallaReviewsSummary = /*@__PURE__*/ proxyCustomElement(class SallaReviewsS
|
|
|
94
103
|
const percentage = ratings[rating];
|
|
95
104
|
return (h("div", { key: rating, class: "s-reviews-summary-row" }, h("div", { class: "s-reviews-summary-row-rate" }, rating, " ", h("span", { innerHTML: Rate })), h("salla-progress-bar", { class: "s-reviews-summary-progress", value: percentage, target: 100, hideUnits: true, height: '16px' }), h("span", { class: "s-reviews-summary-percentage" }, percentage, "%")));
|
|
96
105
|
});
|
|
97
|
-
return (h(Host, { class: "s-reviews-summary-wrapper" }, h("div", { class: "s-reviews-summary-header" }, h("div", { class: "s-reviews-summary-
|
|
106
|
+
return (h(Host, { class: "s-reviews-summary-wrapper" }, h("div", { class: "s-reviews-summary-header" }, h("div", { class: "s-reviews-summary-overall-section items-start" }, h("p", { class: "s-reviews-summary-overall-label" }, this.overallRatingLabel), h("div", { class: "s-reviews-summary-overall-row" }, h("h3", { class: "s-reviews-summary-average" }, this.data.rating), h("div", null, h("salla-rating-stars", { size: 'large', value: this.data.rating }), h("p", { class: "s-reviews-summary-count" }, this.basedOnLabel, " ", salla.helpers.number(salla.lang.choice('pages.rating.reviews', this.data.count)))))), this.renderFactorTags(), this.renderRecommendation()), h("div", { class: "s-reviews-summary-rows" }, reviewElements)));
|
|
98
107
|
}
|
|
99
108
|
static get style() { return sallaReviewsSummaryCss; }
|
|
100
109
|
}, [0, "salla-reviews-summary", {
|
|
@@ -103,6 +112,7 @@ const SallaReviewsSummary = /*@__PURE__*/ proxyCustomElement(class SallaReviewsS
|
|
|
103
112
|
"canRender": [32],
|
|
104
113
|
"basedOnLabel": [32],
|
|
105
114
|
"recommendedLabel": [32],
|
|
115
|
+
"overallRatingLabel": [32],
|
|
106
116
|
"showRatingSummary": [32],
|
|
107
117
|
"recommendationOnly": [32],
|
|
108
118
|
"showRecommendation": [32]
|
|
@@ -98,7 +98,7 @@ const SallaReviews$1 = /*@__PURE__*/ proxyCustomElement(class SallaReviews exten
|
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
render() {
|
|
101
|
-
return (h("div", { key: '
|
|
101
|
+
return (h("div", { key: '242c98e813b49a8fae5b1f58a1bc7e61425834bd', class: "s-reviews-container" }, h("div", { key: 'a896d0fda0e9c5a784e813590ded4cdf9ae0e6ae', class: "s-reviews-header-wrapper" }, h("h1", { key: 'ff085d49e3363d305389ae36e14ebb01151ebe46', class: "s-reviews-header" }, this.testimonialText), !!this.displayAllLink ? (h("a", { href: this.displayAllURL, class: "s-reviews-display-all" }, this.displayAllLinkText, h("span", { class: "s-reviews-display-all-icon", innerHTML: IconArrowLeft }))) : null), h("salla-slider", { key: 'a6baa7db6f0a1233a46897caaea76469b945f681', centered: true, "slides-per-view": 1, type: "testimonials", class: "s-reviews-testimonials-slider", "controls-outer": true, "auto-play": true, id: `testimonials-${this.source}-slider` }, h("div", { key: 'edb56b99674d534fc4b18178816cbced4ed22882', slot: "items" }, this.reviews.map((item, index) => (h("div", { key: index, class: "s-reviews-swiper-slide" }, h("div", { class: "s-reviews-testimonial" }, h("div", { class: "s-reviews-testimonial__inner" }, h("div", { class: "s-reviews-testimonial__avatar" }, h("img", { src: 'images/s-empty.png', "data-src": item.avatar, alt: item.name ? item.name : 'testimonial-' + index, class: "lazy" })), h("div", { class: "s-reviews-testimonial__text" }, h("p", { innerHTML: item.content }), h("div", { class: "s-reviews-testimonial__name_wrapper" }, h("div", { class: "s-reviews-testimonial__info" }, item.name && h("h2", null, `${item.name}`)), h("div", { class: "s-reviews-testimonial__rating" }, h("salla-rating-stars", { size: "small", value: item.stars })))), h("span", { class: "s-reviews-testimonial__icon", innerHTML: IconQuoteOpen }))))))))));
|
|
102
102
|
}
|
|
103
103
|
static get style() { return sallaReviewsCss; }
|
|
104
104
|
}, [0, "salla-reviews", {
|
|
@@ -132,10 +132,10 @@ const SallaSearch$1 = /*@__PURE__*/ proxyCustomElement(class SallaSearch extends
|
|
|
132
132
|
this.inputValue.length < 3 ? this.container.classList.remove('s-search-no-results') : '';
|
|
133
133
|
}
|
|
134
134
|
render() {
|
|
135
|
-
const searchContent = (h("div", { key: '
|
|
135
|
+
const searchContent = (h("div", { key: '4b97f190e4fcceb6d3f0bafecffc46aca578a657', class: { 's-search-container': true, 's-search-inline': this.inline }, ref: container => (this.container = container) }, h("div", { key: '4ce6eff390279cdca5dccf26fc2d27a53511b8d3', class: "s-search-input-wrapper" }, h("span", { key: 'bee65f6f7735601d44aa6fb58482d4632f70ed68', class: "s-search-icon-wrap" }, h("span", { key: '4d95d81c5ac952aabf40e70b1f06c17ec9d0df50', class: "s-search-icon", innerHTML: this.loading ? '<i class="s-search-spinner-loader"/>' : Search })), h("input", { key: 'bf605abb622e46632be9e2cc47b8eaec5823b3cf', type: "search", enterkeyhint: "search", autocomplete: "off", class: "s-search-input", placeholder: salla.lang.get('blocks.header.search_placeholder'), onInput: (e) => this.limitWordsAndSearch(e), onKeyDown: e => this.handleKeyDown(e), ref: input => (this.searchInput = input), style: {
|
|
136
136
|
height: this.height + 'px',
|
|
137
137
|
borderRadius: this.oval ? this.height / 2 + 'px' : '',
|
|
138
|
-
} }), this.showAction ? (h("salla-button", { loading: this.loading, class: { 's-search-action': true, 's-search-action-oval': this.oval }, onClick: () => this.handleActionClick() }, !this.loading && h("span", { innerHTML: Search }))) : null), h("div", { key: '
|
|
138
|
+
} }), this.showAction ? (h("salla-button", { loading: this.loading, class: { 's-search-action': true, 's-search-action-oval': this.oval }, onClick: () => this.handleActionClick() }, !this.loading && h("span", { innerHTML: Search }))) : null), h("div", { key: '46b979e82da5d5b03cdb348bbb3f0f5828087949', class: "s-search-results" }, this.results?.data.map(product => (h("a", { href: product.url + '?from=search-bar', class: {
|
|
139
139
|
's-search-product': true,
|
|
140
140
|
's-search-product-not-available': !product.is_available,
|
|
141
141
|
}, innerHTML: this.productSlot
|
|
@@ -144,9 +144,9 @@ const SallaSearch$1 = /*@__PURE__*/ proxyCustomElement(class SallaSearch extends
|
|
|
144
144
|
.replace(/\{regular_price\}/g, product.is_on_sale && product.regular_price
|
|
145
145
|
? salla.money(product.regular_price)
|
|
146
146
|
: '')
|
|
147
|
-
.replace(/\{image\}/g, product.image.url) }))), h("p", { key: '
|
|
148
|
-
const modalContent = (h("salla-modal", { key: '
|
|
149
|
-
const placeholderContent = (h("div", { key: '
|
|
147
|
+
.replace(/\{image\}/g, product.image.url) }))), h("p", { key: '484dbcb11952df2a5d100dfc176c98359b059070', ref: el => (this.noResults = el), class: "s-search-no-results-placeholder" }, salla.lang.get('common.elements.no_options')))));
|
|
148
|
+
const modalContent = (h("salla-modal", { key: 'b35ef402291810a005673d3d55227cc7919c593a', position: "top", class: "s-search-modal", ref: modal => (this.modal = modal) }, searchContent));
|
|
149
|
+
const placeholderContent = (h("div", { key: 'cff9e90ce4641545cd97d2946f52f49e4fbada91', class: "s-search-placeholder-wrapper s-search-inline" }, h("div", { key: 'd48ebc0c07ef4dc154cca5d99cfa652bf06cb84c', class: "s-search-input-wrapper" }, h("span", { key: 'b0c4055476bc996d3be3df9af49dc7fead72dabc', class: "s-search-icon-wrap" }, h("span", { key: '55c84b48d01ed6da83e802904ca1e0df7afc6060', class: "s-search-icon", innerHTML: Search })), h("button", { key: '86356037f4bf117bef07d4afd1569342e2e729c7', type: "button", class: "s-search-input s-search-placeholder-trigger", onClick: () => this.open(), style: {
|
|
150
150
|
height: this.height + 'px',
|
|
151
151
|
borderRadius: this.oval ? this.height / 2 + 'px' : '',
|
|
152
152
|
} }, salla.lang.get('blocks.header.search_placeholder'))), modalContent));
|