@salla.sa/twilight-components 2.14.543 → 2.14.545
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{filepond-uhJt4caG.js → filepond-B5aWlI3l.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-Dy-GRHf0.js → filepond-plugin-file-poster-BYq39KHd.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-BWIBGLW-.js → filepond-plugin-file-validate-size-Bi3TAsJv.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-DEVtMF0l.js → filepond-plugin-file-validate-type-Ck6S5TuZ.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-DSDoJaLw.js → filepond-plugin-image-edit-DbsdnH5j.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-BdZit5hj.js → filepond-plugin-image-exif-orientation-x7TfJR-2.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-Z3_zQyYR.js → filepond-plugin-image-preview-CrU7vIRk.js} +1 -1
- package/dist/cjs/helpers-DHdDjm5V.js +340 -0
- package/dist/cjs/{index-Bw3b6O6G.js → index-DGpOR-TH.js} +14 -14
- package/dist/cjs/{intlTelInput-CXe3TkdL.js → intlTelInput-DKAXRecW.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{mail-CO8cFZH7.js → mail-C9D8MHae.js} +2 -2
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +1 -1
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-attachment-view_9.cjs.entry.js +10 -10
- package/dist/cjs/salla-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
- package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +156 -401
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
- package/dist/cjs/{salla-comment-form_9.cjs.entry.js → salla-comment-form_8.cjs.entry.js} +3 -259
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +3 -3
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +21 -5
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +3 -3
- package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-map_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +3 -3
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +14 -73
- package/dist/cjs/salla-rating-modal.cjs.entry.js +7 -22
- package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/salla-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +4 -4
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
- package/dist/cjs/salla-verify.cjs.entry.js +3 -3
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-GTx-kpDm.js → vanilla-picker-DQDSSf6Q.js} +1 -1
- package/dist/collection/collection-manifest.json +12 -14
- package/dist/collection/components/salla-bullet-delivery/helpers.js +3 -0
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +82 -16
- package/dist/collection/components/salla-comments/interfaces.js +0 -12
- package/dist/collection/components/salla-comments/salla-comment-item.js +1 -1
- package/dist/collection/components/salla-comments/salla-comments.js +5 -38
- package/dist/collection/components/salla-delivery-promise/delivery-promise-api.js +1 -1
- package/dist/collection/components/salla-delivery-promise/delivery-promise-intent.js +9 -0
- package/dist/collection/components/salla-delivery-promise/salla-delivery-promise.js +10 -3
- package/dist/collection/components/salla-rating-modal/salla-rating-modal-v2.js +16 -119
- package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +10 -69
- package/dist/components/helpers.js +319 -0
- package/dist/components/index.js +2 -2
- package/dist/components/salla-bullet-delivery.js +82 -327
- package/dist/components/salla-comment-item2.js +1 -1
- package/dist/components/salla-comments.js +1 -40
- package/dist/components/salla-delivery-promise.js +20 -4
- package/dist/components/salla-rating-modal-v22.js +12 -73
- package/dist/components/salla-rating-modal.js +591 -1
- package/dist/esm/{filepond-plugin-file-poster-BTU_WzVu.js → filepond-plugin-file-poster-CkWxCmZT.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-c_09APqP.js → filepond-plugin-file-validate-size-DlWS-oUK.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-Dz2Lgh8V.js → filepond-plugin-file-validate-type-mdpFM1TG.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DK7eXs2p.js → filepond-plugin-image-edit-BqPLKgZU.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-DYBURwn_.js → filepond-plugin-image-exif-orientation-CMqFjPu7.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-4WNiH-ie.js → filepond-plugin-image-preview-DjCwk-CI.js} +1 -1
- package/dist/esm/{filepond-BcXR53L3.js → filepond-wd7_MQSV.js} +1 -1
- package/dist/esm/helpers-BDChq2t4.js +319 -0
- package/dist/esm/{index-BW1au-Nh.js → index-CHZfg_a9.js} +14 -14
- package/dist/esm/{intlTelInput-DvPcVtVG.js → intlTelInput-B5Q8rrU9.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{mail-DmgxDvXL.js → mail-DzAIgzdz.js} +2 -2
- package/dist/esm/salla-accordion-body_2.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +1 -1
- package/dist/esm/salla-add-product-button_5.entry.js +1 -1
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +1 -1
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-attachment-view_9.entry.js +10 -10
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-basket-gap.entry.js +1 -1
- package/dist/esm/salla-bullet-delivery_2.entry.js +83 -328
- package/dist/esm/salla-cart-coupons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
- package/dist/esm/salla-cart-summary-card.entry.js +1 -1
- package/dist/esm/salla-cashback-banner.entry.js +1 -1
- package/dist/esm/salla-comment-factors.entry.js +1 -1
- package/dist/esm/{salla-comment-form_9.entry.js → salla-comment-form_8.entry.js} +4 -259
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +3 -3
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +21 -5
- package/dist/esm/salla-edit-order-button.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +1 -1
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-banner_10.entry.js +3 -3
- package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty.entry.js +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-map_2.entry.js +1 -1
- package/dist/esm/salla-menu.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-next-order-coupon.entry.js +1 -1
- package/dist/esm/salla-notification-item_2.entry.js +1 -1
- package/dist/esm/salla-offer-modal.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-branch.entry.js +1 -1
- package/dist/esm/salla-order-cancel.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-order-shipments.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-placeholder.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-product-card-embed.entry.js +1 -1
- package/dist/esm/salla-product-size-guide.entry.js +1 -1
- package/dist/esm/salla-products-list.entry.js +1 -1
- package/dist/esm/salla-products-slider.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +3 -3
- package/dist/esm/salla-rating-modal-v2.entry.js +14 -73
- package/dist/esm/salla-rating-modal.entry.js +7 -22
- package/dist/esm/salla-review-factors-tags.entry.js +1 -1
- package/dist/esm/salla-review-order-item.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +1 -1
- package/dist/esm/salla-slider.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +4 -4
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tab-content_3.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +1 -1
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +1 -1
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.entry.js +1 -1
- package/dist/esm/salla-verify.entry.js +3 -3
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/salla-wishlist-actions.entry.js +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-CDk_knNu.js → vanilla-picker-uNDULydX.js} +1 -1
- package/dist/twilight/{p-df202b1d.entry.js → p-0495bfac.entry.js} +1 -1
- package/dist/twilight/{p-13dbbbdc.entry.js → p-0573a498.entry.js} +1 -1
- package/dist/twilight/{p-b89d8c3c.entry.js → p-06d9e1c5.entry.js} +1 -1
- package/dist/twilight/{p-b1dfc455.entry.js → p-0749cc55.entry.js} +1 -1
- package/dist/twilight/p-0ae39262.entry.js +4 -0
- package/dist/twilight/{p-de83979a.entry.js → p-12836275.entry.js} +1 -1
- package/dist/twilight/p-12f61ae1.entry.js +4 -0
- package/dist/twilight/{p-69f4a089.entry.js → p-1419a93d.entry.js} +1 -1
- package/dist/twilight/{p-baa06c65.entry.js → p-17d49c87.entry.js} +1 -1
- package/dist/twilight/{p-1282e22a.entry.js → p-1ea25389.entry.js} +1 -1
- package/dist/twilight/{p-80c11fae.entry.js → p-2305edcc.entry.js} +1 -1
- package/dist/twilight/{p-10534171.entry.js → p-235d7596.entry.js} +1 -1
- package/dist/twilight/{p-50c0b6fa.entry.js → p-25d9f1b2.entry.js} +1 -1
- package/dist/twilight/{p-16ccbce5.entry.js → p-25f51a7e.entry.js} +1 -1
- package/dist/twilight/{p-3c28560f.entry.js → p-279a1661.entry.js} +1 -1
- package/dist/twilight/{p-ac794ed6.entry.js → p-28248b6b.entry.js} +1 -1
- package/dist/twilight/{p-7afd066a.entry.js → p-2d01a4f5.entry.js} +1 -1
- package/dist/twilight/{p-66c7b9e4.entry.js → p-2d62c947.entry.js} +1 -1
- package/dist/twilight/{p-489d084c.entry.js → p-2db5e829.entry.js} +1 -1
- package/dist/twilight/{p-362792d6.entry.js → p-2de58591.entry.js} +1 -1
- package/dist/twilight/{p-16296dce.entry.js → p-32e3daa3.entry.js} +1 -1
- package/dist/twilight/{p-beb2110d.entry.js → p-345532e5.entry.js} +1 -1
- package/dist/twilight/{p-280e67f0.entry.js → p-346366ba.entry.js} +1 -1
- package/dist/twilight/{p-46399dc8.entry.js → p-35557962.entry.js} +1 -1
- package/dist/twilight/{p-d54acab0.entry.js → p-3672d4f7.entry.js} +1 -1
- package/dist/twilight/{p-315890b5.entry.js → p-37163aef.entry.js} +1 -1
- package/dist/twilight/{p-e184cd72.entry.js → p-391a2ec6.entry.js} +1 -1
- package/dist/twilight/{p-b2b818a5.entry.js → p-3a8be7df.entry.js} +1 -1
- package/dist/twilight/{p-ceb40475.entry.js → p-3f5bc617.entry.js} +1 -1
- package/dist/twilight/{p-cf4efddb.entry.js → p-419499d6.entry.js} +1 -1
- package/dist/twilight/{p-d018fc49.entry.js → p-4ac9a3b6.entry.js} +1 -1
- package/dist/twilight/{p-aa9fb9f5.entry.js → p-5074de7d.entry.js} +1 -1
- package/dist/twilight/{p-65a86613.entry.js → p-51a062cd.entry.js} +1 -1
- package/dist/twilight/p-54e2d320.entry.js +1024 -0
- package/dist/twilight/{p-84679cc1.entry.js → p-5933ba05.entry.js} +1 -1
- package/dist/twilight/{p-4b14e0f8.entry.js → p-5d9a85b0.entry.js} +1 -1
- package/dist/twilight/{p-d7a68f6c.entry.js → p-5ded000f.entry.js} +1 -1
- package/dist/twilight/{p-a3fdec51.entry.js → p-63b01300.entry.js} +1 -1
- package/dist/twilight/{p-677bcf4c.entry.js → p-64efbb2c.entry.js} +1 -1
- package/dist/twilight/{p-feb80402.entry.js → p-67b91397.entry.js} +1 -1
- package/dist/twilight/{p-9b1403fc.entry.js → p-69119c00.entry.js} +1 -1
- package/dist/twilight/{p-6e78ee63.entry.js → p-6c18cc72.entry.js} +1 -1
- package/dist/twilight/{p-1ba8fb02.entry.js → p-6d961d73.entry.js} +1 -1
- package/dist/twilight/{p-64f0c216.entry.js → p-6ff53523.entry.js} +1 -1
- package/dist/twilight/{p-75065cbf.entry.js → p-72ee7071.entry.js} +1 -1
- package/dist/twilight/{p-6d6618f8.entry.js → p-72f54055.entry.js} +1 -1
- package/dist/twilight/{p-3b9dcb0f.entry.js → p-74529abb.entry.js} +1 -1
- package/dist/twilight/{p-664d428e.entry.js → p-766a3291.entry.js} +1 -1
- package/dist/twilight/{p-d3692caf.entry.js → p-788fd019.entry.js} +1 -1
- package/dist/twilight/{p-a15b4245.entry.js → p-82fe9f82.entry.js} +1 -1
- package/dist/twilight/{p-f45f5f91.entry.js → p-832f3a98.entry.js} +1 -1
- package/dist/twilight/{p-89fe5237.entry.js → p-84380d4a.entry.js} +1 -1
- package/dist/twilight/{p-311a905b.entry.js → p-8780a467.entry.js} +1 -1
- package/dist/twilight/{p-7adefcd6.entry.js → p-87e10a68.entry.js} +1 -1
- package/dist/twilight/{p-3cfd4fcd.entry.js → p-88f50d7e.entry.js} +1 -1
- package/dist/twilight/{p-f0a04676.entry.js → p-8fc6e860.entry.js} +1 -1
- package/dist/twilight/{p-cc3a9188.entry.js → p-90e5c3ab.entry.js} +1 -1
- package/dist/twilight/{p-641cc01d.entry.js → p-93aa1b67.entry.js} +1 -1
- package/dist/twilight/{p-a4436d17.entry.js → p-93dabb47.entry.js} +1 -1
- package/dist/twilight/{p-07c013f9.entry.js → p-98108ebe.entry.js} +1 -1
- package/dist/twilight/{p-72960bb3.entry.js → p-989f2adb.entry.js} +1 -1
- package/dist/twilight/{p-4be8900d.entry.js → p-9d224252.entry.js} +1 -1
- package/dist/twilight/p-BDChq2t4.js +4 -0
- package/dist/twilight/{p-D9Y6HNvi.js → p-BPkSO6gd.js} +1 -1
- package/dist/twilight/{p-BUMDIRU5.js → p-BWvO3cE-.js} +1 -1
- package/dist/twilight/{p-BW1au-Nh.js → p-CHZfg_a9.js} +1 -1
- package/dist/twilight/{p-AncUY1nn.js → p-CdgES2Of.js} +1 -1
- package/dist/twilight/{p-DPMPVhgw.js → p-D9VjvNQq.js} +2 -2
- package/dist/twilight/{p-C6nX89oY.js → p-DO7S0QBX.js} +1 -1
- package/dist/twilight/{p-UDPL8zGN.js → p-DtV7npW9.js} +1 -1
- package/dist/twilight/{p-DmgxDvXL.js → p-DzAIgzdz.js} +1 -1
- package/dist/twilight/{p-UIEwOe70.js → p-PCp-0mbL.js} +1 -1
- package/dist/twilight/{p-BjS2Vb6h.js → p-ZinKLSYw.js} +1 -1
- package/dist/twilight/{p-1c82117c.entry.js → p-a0561bd1.entry.js} +1 -1
- package/dist/twilight/{p-1187210a.entry.js → p-a785b49f.entry.js} +1 -1
- package/dist/twilight/{p-13bf1c47.entry.js → p-aa4daadf.entry.js} +1 -1
- package/dist/twilight/p-ab41d26c.entry.js +4 -0
- package/dist/twilight/{p-87cc2e08.entry.js → p-afb03ee5.entry.js} +1 -1
- package/dist/twilight/{p-caa8d5ae.entry.js → p-b279e0bb.entry.js} +1 -1
- package/dist/twilight/{p-bcee5564.entry.js → p-b33392c6.entry.js} +1 -1
- package/dist/twilight/{p-e1eb70d2.entry.js → p-b38c4e39.entry.js} +1 -1
- package/dist/twilight/{p-26f8a482.entry.js → p-bead6e6f.entry.js} +1 -1
- package/dist/twilight/{p-8643930a.entry.js → p-c26043ff.entry.js} +1 -1
- package/dist/twilight/{p-a7a10dbf.entry.js → p-c287e498.entry.js} +1 -1
- package/dist/twilight/{p-87af932a.entry.js → p-c2fe2dbe.entry.js} +1 -1
- package/dist/twilight/{p-6d3a4c41.entry.js → p-c603722c.entry.js} +1 -1
- package/dist/twilight/{p-edebecb3.entry.js → p-c816b198.entry.js} +1 -1
- package/dist/twilight/{p-f3f9d1fb.entry.js → p-c81bce54.entry.js} +1 -1
- package/dist/twilight/{p-40555637.entry.js → p-c9146d50.entry.js} +1 -1
- package/dist/twilight/{p-5335f307.entry.js → p-c92edd6f.entry.js} +1 -1
- package/dist/twilight/{p-821aa95a.entry.js → p-c948a8a8.entry.js} +1 -1
- package/dist/twilight/{p-93c006fc.entry.js → p-d0d3609c.entry.js} +1 -1
- package/dist/twilight/{p-a38dc391.entry.js → p-d9b0fa64.entry.js} +1 -1
- package/dist/twilight/{p-534e7760.entry.js → p-dd823fde.entry.js} +1 -1
- package/dist/twilight/p-e36f62a9.entry.js +4 -0
- package/dist/twilight/{p-beaab93e.entry.js → p-e5a3b689.entry.js} +1 -1
- package/dist/twilight/{p-c7e980aa.entry.js → p-ec281904.entry.js} +1 -1
- package/dist/twilight/{p-68d6fa66.entry.js → p-f07bbbc7.entry.js} +1 -1
- package/dist/twilight/{p-3ad55c42.entry.js → p-f168109d.entry.js} +1 -1
- package/dist/twilight/{p-e8153a9a.entry.js → p-f1d8729d.entry.js} +1 -1
- package/dist/twilight/{p-2a8f1ed4.entry.js → p-f1dfe18b.entry.js} +1 -1
- package/dist/twilight/{p-c23f7b95.entry.js → p-fb1ad954.entry.js} +1 -1
- package/dist/twilight/{p-c214700a.entry.js → p-ffdf5f92.entry.js} +1 -1
- package/dist/twilight/{p-CMWS1gyZ.js → p-ryHWESoh.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-bullet-delivery/helpers.d.ts +1 -0
- package/dist/types/components/salla-bullet-delivery/interfaces.d.ts +14 -4
- package/dist/types/components/salla-bullet-delivery/salla-bullet-delivery.d.ts +2 -0
- package/dist/types/components/salla-comments/interfaces.d.ts +0 -15
- package/dist/types/components/salla-comments/salla-comments.d.ts +2 -5
- package/dist/types/components/salla-delivery-promise/delivery-promise-intent.d.ts +0 -4
- package/dist/types/components/salla-delivery-promise/interfaces.d.ts +2 -1
- package/dist/types/components/salla-rating-modal/salla-rating-modal-v2.d.ts +3 -16
- package/dist/types/components/salla-rating-modal/salla-rating-modal.d.ts +2 -10
- package/dist/types/components.d.ts +12 -45
- package/package.json +5 -5
- package/dist/collection/components/salla-verified-review/salla-verified-review.css +0 -162
- package/dist/collection/components/salla-verified-review/salla-verified-review.js +0 -264
- package/dist/components/salla-rating-modal2.js +0 -613
- package/dist/components/salla-verified-review.d.ts +0 -11
- package/dist/components/salla-verified-review.js +0 -325
- package/dist/twilight/p-03d77f90.entry.js +0 -4
- package/dist/twilight/p-4f052df8.entry.js +0 -4
- package/dist/twilight/p-a9674965.entry.js +0 -4
- package/dist/twilight/p-cbe760ce.entry.js +0 -4
- package/dist/twilight/p-e29f28eb.entry.js +0 -1019
- package/dist/types/components/salla-verified-review/salla-verified-review.d.ts +0 -51
|
@@ -1,613 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Crafted with ❤ by Salla
|
|
3
|
-
*/
|
|
4
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
5
|
-
import { a as anime } from './anime.es.js';
|
|
6
|
-
import { C as CheckCircle2 } from './check-circle2.js';
|
|
7
|
-
import { I as ImageIcon } from './image.js';
|
|
8
|
-
import { M as MailIcon } from './mail.js';
|
|
9
|
-
import { d as defineCustomElement$4, S as ShippingFast } from './salla-rating-modal-v22.js';
|
|
10
|
-
import { W as WishListIcon } from './star.js';
|
|
11
|
-
import { W as WhatsappIcon } from './whatsapp2.js';
|
|
12
|
-
import { H as Helper } from './Helper.js';
|
|
13
|
-
import { d as defineCustomElement$a } from './salla-attachment-view2.js';
|
|
14
|
-
import { d as defineCustomElement$9 } from './salla-button2.js';
|
|
15
|
-
import { d as defineCustomElement$8 } from './salla-file-upload2.js';
|
|
16
|
-
import { d as defineCustomElement$7 } from './salla-loading2.js';
|
|
17
|
-
import { d as defineCustomElement$6 } from './salla-modal2.js';
|
|
18
|
-
import { d as defineCustomElement$5 } from './salla-placeholder2.js';
|
|
19
|
-
import { d as defineCustomElement$3 } from './salla-rating-stars2.js';
|
|
20
|
-
import { d as defineCustomElement$2 } from './salla-skeleton2.js';
|
|
21
|
-
import { d as defineCustomElement$1 } from './salla-slider2.js';
|
|
22
|
-
|
|
23
|
-
const sallaRatingModalCss = "/*!twlt*/.s-rating-modal-uploader{overflow:visible}.s-rating-modal-uploader.is-opened{height:auto !important;opacity:1 !important;overflow:visible;pointer-events:auto !important;margin-bottom:1rem}.s-rating-modal-uploader .s-file-upload-gallery{overflow:visible}.s-rating-modal-edit-wrapper,.s-rating-modal-wrapper{transition:height 0.15s ease}.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{position:absolute !important;inset:0;display:block;width:100% !important;max-width:100% !important;height:100% !important;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-loyalty-points-note-container{display:flex;align-items:center;gap:0.625rem;width:100%;margin-top:1.5rem;margin-bottom:0.75rem;padding:0.75rem;border-radius:0.5rem;background-color:#E6F4EA}.s-rating-modal-loyalty-points-note-icon{display:flex;flex-shrink:0;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;color:#1B7F5C}.s-rating-modal-loyalty-points-note-icon svg{width:1.5rem;height:1.5rem;fill:currentColor}.s-rating-modal-loyalty-points-note-text{flex:1;margin:0;font-size:0.875rem;line-height:1.25rem;color:#1f2937}.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{position:relative;width:5rem !important;min-width:5rem !important;max-width:5rem !important;height:3.5rem !important;flex-shrink:0 !important;overflow:hidden;border-radius:0.375rem;background:#f3f4f6}.mt-0{margin-top:0px}.block{display:block}.hidden{display:none}.px-3{padding-left:0.75rem;padding-right:0.75rem}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.outline{outline-style:solid}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.s-comments-item-like-btn{margin-top:0.5rem}.s-comments-item-like-btn .s-button-text{display:flex;flex-direction:row-reverse;gap:0.5rem}.s-comments-item-like-btn span svg{height:0.75rem;width:0.75rem}.s-rating-modal-wrapper{margin-bottom:1.5rem;transition-property:all;transition-duration:100ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.s-rating-modal-edit-wrapper{margin-top:0.625rem}.s-rating-modal-footer{position:relative;display:flex;align-items:center;justify-content:space-between}.s-rating-modal-footer salla-button button{padding-left:1rem !important;padding-right:1rem !important;font-size:0.75rem !important}.s-rating-modal-btn{height:2.5rem;padding-left:1rem;padding-right:1rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;color:var(--color-primary);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-rating-modal-btn:hover{color:var(--color-primary-dark)}.s-rating-modal-dots{display:flex;flex-shrink:0;flex-grow:1;justify-content:center}.s-rating-modal-dots>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.375rem * var(--tw-space-x-reverse));margin-left:calc(0.375rem * calc(1 - var(--tw-space-x-reverse)))}.s-rating-modal-dots{text-align:center}.s-rating-modal-dots:where([dir=\"rtl\"],[dir=\"rtl\"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-rating-modal-step-dot{height:0.625rem;width:0.625rem;border-radius:9999px;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-rating-modal-step{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms}.s-rating-modal-active{--tw-translate-x:0px;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:1}.s-rating-modal-unactive{--tw-translate-x:0.75rem;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:0}.s-rating-modal-hidden{display:none !important}.s-rating-modal-unvisiable{pointer-events:none;opacity:0}.s-rating-modal-step-wrap{position:relative;display:flex;flex-direction:column;align-items:center;padding-bottom:1rem}.s-rating-modal-product-details{position:relative;display:flex;flex:1 1 0%;flex-direction:column;padding-bottom:1rem}.s-rating-modal-product-details-main{display:flex;align-items:flex-start;justify-content:space-between}.s-rating-modal-product-details-main .s-rating-stars-wrapper{margin-bottom:0.375rem;flex-direction:column;align-items:center}@media (min-width: 640px){.s-rating-modal-product-details-main .s-rating-stars-wrapper{margin-bottom:0px;flex-direction:row;gap:0px}}.s-rating-modal-rounded-icon{margin-bottom:1rem;display:flex;height:7rem;width:7rem;align-items:center;justify-content:center;overflow:hidden;border-radius:9999px;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.s-rating-modal-title{margin-bottom:1rem;font-size:1.125rem;line-height:1.75rem;font-weight:700}.s-rating-modal-store-logo{width:4rem;object-fit:contain}.s-rating-modal-shipping-logo{height:100%;width:100%;object-fit:contain}.s-rating-modal-shipping-icon{font-size:3rem;line-height:1;color:var(--color-primary)}.s-rating-modal-comment{margin-bottom:0.5rem;height:5rem !important;width:100%;border-radius:0.375rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding:0.75rem;font-size:0.875rem;line-height:1.25rem;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-rating-modal-comment:focus{border-color:var(--color-primary)}.s-rating-modal-comment:is(.dark *){--tw-border-opacity:1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.s-rating-modal-validation-msg{margin-top:-3px;line-height:1rem;--tw-text-opacity:1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.s-rating-modal-product{margin-bottom:1.5rem}.s-rating-modal-product:last-child{margin-bottom:0px}.s-rating-modal-product .rating-outer-form{display:flex}.s-rating-modal-product .rating-outer-form>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem * var(--tw-space-x-reverse));margin-left:calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))}@media (min-width: 640px){.s-rating-modal-product .rating-outer-form>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1.25rem * var(--tw-space-x-reverse));margin-left:calc(1.25rem * calc(1 - var(--tw-space-x-reverse)))}}.s-rating-modal-product .rating-outer-form:where([dir=\"rtl\"],[dir=\"rtl\"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-rating-modal-product-img-wrap{height:3.5rem;width:auto;overflow:hidden;border-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}@media (min-width: 640px){.s-rating-modal-product-img-wrap{width:5rem}}.s-rating-modal-product-img{position:relative;height:100%;width:100%;object-fit:cover;font-size:0px}.s-rating-modal-product-img::before{position:absolute;top:0px;left:0px;height:100%;width:100%;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));--tw-content:'';content:var(--tw-content)}.s-rating-modal-product-title{margin-bottom:0.375rem;font-size:0.875rem;font-weight:700;line-height:1.25rem}.s-rating-modal-thanks{padding-left:2rem;padding-right:2rem;text-align:center;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms}.s-rating-modal-icon{display:inline-flex;height:5rem;width:5rem;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1));color:var(--color-primary)}.s-rating-modal-icon svg{height:1.75rem;width:1.75rem;fill:var(--color-primary)}.s-rating-modal-thanks-title{margin-top:1rem;font-weight:700}.s-rating-modal-thanks-msg{margin-bottom:1.5rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-rating-modal-thanks-btn{height:2.5rem;flex:none;display:inline-flex;flex:1 1 0%;align-items:center;justify-content:center;white-space:nowrap;border-radius:0.375rem;padding-left:1.5rem;padding-right:1.5rem;padding-bottom:0.625rem;padding-top:0.5rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-rating-modal-thanks-btn:hover{opacity:0.8}.s-rating-modal-thanks-btn{border-width:1px;border-color:var(--color-primary);background-color:var(--color-primary);color:var(--color-primary-reverse)}.s-rating-modal-thanks-time{margin-top:0.75rem;display:block;height:1.5rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-rating-modal-stars-company{margin-bottom:1.25rem}.s-rating-modal-stars-company .s-rating-stars-wrapper{flex-direction:column;align-items:center;justify-content:center;gap:0.5rem}.s-rating-modal-stars-product{margin-bottom:0.25rem}.s-rating-modal-upload-count{font-size:0.875rem;line-height:1.25rem;font-weight:500}.s-rating-modal-bg-gray{--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.s-rating-modal-bg-primary{background-color:var(--color-primary)}unicode{unicode-bidi:plaintext}.s-rating-modal-wrap .s-modal-body{position:relative !important}.s-rating-modal-skeleton{display:flex;flex-direction:column;align-items:center;justify-content:center}.s-rating-modal-skeleton salla-skeleton:nth-child(1){margin-bottom:1.25rem}.s-rating-modal-skeleton salla-skeleton:nth-child(2){margin-bottom:0.75rem}.s-rating-modal-skeleton salla-skeleton:nth-child(3){margin-bottom:1.25rem}.s-rating-modal-skeleton salla-skeleton:nth-child(4){margin-bottom:2rem}.s-rating-modal-skeleton-footer{margin-top:1.5rem;display:flex;width:100%;justify-content:flex-end}.s-rating-modal-skeleton-footer salla-skeleton{margin-bottom:0px !important}.s-rating-modal-skeleton-stars{margin-bottom:0.75rem;display:flex;align-items:center}.s-rating-modal-skeleton-stars>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem * var(--tw-space-x-reverse));margin-left:calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))}.s-rating-modal-skeleton-stars:where([dir=\"rtl\"],[dir=\"rtl\"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-rating-modal-skeleton-stars div svg{width:25px;fill:currentColor;--tw-text-opacity:1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.s-rating-modal-uploader{height:0px;opacity:0;transition-property:all;transition-duration:100ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.s-rating-modal-uploader.is-opened{margin-bottom:1.5rem;overflow:visible}.s-rating-modal-uploader.is-closed{pointer-events:none;z-index:0}.s-rating-modal-uploader .filepond--drop-label{--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.s-rating-modal-uploader .filepond--file-status .filepond--file-status-main{font-size:11px}.s-rating-modal-uploader .filepond--file-info-main{font-size:11px}.s-rating-modal-uploader li[data-filepond-item-state='load-invalid'] .filepond--file-info{display:none}.s-rating-modal-filepond-placeholder-text{font-size:0.75rem !important;line-height:1rem !important}.s-rating-modal-filepond-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center}.s-rating-modal-filepond-placeholder-icon{margin-bottom:0.25rem}.s-rating-modal-filepond-placeholder-icon svg{height:1.5rem;width:1.5rem;fill:#7c8082}.s-rating-modal-contact{margin-bottom:1rem;display:flex;align-items:center;justify-content:space-between;border-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));padding:0.5rem}.s-rating-modal-contact p{font-size:1rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-rating-modal-contact-icons{display:flex;align-items:center;gap:0.5rem}.s-rating-modal-contact-icons span{display:flex;cursor:pointer;align-items:center;justify-content:center;border-radius:0.375rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:0.375rem}.s-rating-modal-contact-icons span svg{height:1rem;width:1rem;fill:var(--color-primary)}.s-rating-modal-footer-end{justify-content:flex-end}.s-rating-modal-delete-wrapper{text-align:center}.s-rating-modal-delete-wrapper h3{margin-top:1.25rem;font-size:1.125rem;line-height:1.75rem;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-rating-modal-delete-wrapper p{margin-top:1.25rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-rating-modal-delete-actions{margin-top:1.25rem;display:flex;align-items:center;gap:0.625rem}.s-rating-modal-delete-actions salla-button{width:100%}.s-rating-modal-delete-actions salla-button button{width:100%}";
|
|
24
|
-
|
|
25
|
-
const SallaRatingModal = /*@__PURE__*/ proxyCustomElement(class SallaRatingModal extends HTMLElement {
|
|
26
|
-
constructor() {
|
|
27
|
-
super();
|
|
28
|
-
this.__registerHost();
|
|
29
|
-
this.hasError = false;
|
|
30
|
-
this.showContactWidget = true;
|
|
31
|
-
this.images = [];
|
|
32
|
-
this.productImages = {};
|
|
33
|
-
this.editItemImages = [];
|
|
34
|
-
this.contact_body = (store, id, customer) => salla.lang.get('pages.rating.contact_subject', { store, id, customer });
|
|
35
|
-
this.editMode = false;
|
|
36
|
-
this.defaultMode = false;
|
|
37
|
-
this.deleteMode = false;
|
|
38
|
-
this.shouldOpenDeleteModal = false;
|
|
39
|
-
this.editItem = null;
|
|
40
|
-
this.loyaltyImageRatingPoints = 0;
|
|
41
|
-
this.enableNewPopUp = true;
|
|
42
|
-
this.dragAndDropFilesLabel = salla.lang.get('common.uploader.drag_and_drop_files');
|
|
43
|
-
this.contactSubjectLabel = salla.lang.get('pages.rating.contact_subject');
|
|
44
|
-
this.editReviewLabel = salla.lang.get('pages.rating.edit_review');
|
|
45
|
-
this.allowedImagesTypesLabel = salla.lang.get('common.uploader.allowed_images_types');
|
|
46
|
-
this.addImagesLabel = salla.lang.get('pages.rating.add_images');
|
|
47
|
-
this.editImagesLabel = salla.lang.get('pages.rating.edit_images');
|
|
48
|
-
this.threeImagesMax = salla.lang.get('common.uploader.max_three_images');
|
|
49
|
-
this.areYouSureLabel = salla.lang.get('pages.rating.are_you_sure_you_want_to_delete_review');
|
|
50
|
-
this.confirmDeletionLabel = salla.lang.get('pages.rating.confirm_deletion');
|
|
51
|
-
this.cancelLabel = salla.lang.get('common.elements.cancel');
|
|
52
|
-
this.confirmDeleteBtn = salla.lang.get('common.elements.confirm_delete');
|
|
53
|
-
this.updatedSuccessfullyLabel = salla.lang.get("pages.rating.review_updated_successfully");
|
|
54
|
-
this.deletedSuccessfullyLabel = salla.lang.get("pages.rating.review_deleted_successfully");
|
|
55
|
-
this.contactUsLabel = salla.lang.get('blocks.footer.social');
|
|
56
|
-
this.loyaltyPointsForImagesLabel = salla.lang.get('pages.rating.loyalty_points_for_images', { points: ':points' });
|
|
57
|
-
this.allowAttachImages = salla.config.get('store.settings.rating.allow_attach_images');
|
|
58
|
-
this.allowContactSupport = salla.config.get('store.settings.rating.allow_contact_support');
|
|
59
|
-
this.contentRefs = [];
|
|
60
|
-
this.hiddenInputs = [];
|
|
61
|
-
this.isOpen = [];
|
|
62
|
-
this.stepsCount = 0;
|
|
63
|
-
this.currentIndex = 0;
|
|
64
|
-
this.submitted = [];
|
|
65
|
-
this.MAX_UPLOAD_LIMIT = 3;
|
|
66
|
-
this.onOpen = (index) => {
|
|
67
|
-
return new Promise((resolve) => {
|
|
68
|
-
anime({
|
|
69
|
-
targets: this.contentRefs[index],
|
|
70
|
-
duration: 100,
|
|
71
|
-
height: this.contentRefs[index].scrollHeight,
|
|
72
|
-
opacity: [0, 1],
|
|
73
|
-
easing: 'easeOutQuart',
|
|
74
|
-
complete: () => resolve(),
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
this.onClose = (index) => {
|
|
79
|
-
return new Promise((resolve) => {
|
|
80
|
-
anime({
|
|
81
|
-
targets: this.contentRefs[index],
|
|
82
|
-
duration: 100,
|
|
83
|
-
height: 0,
|
|
84
|
-
opacity: [1, 0],
|
|
85
|
-
easing: 'easeOutQuart',
|
|
86
|
-
complete: () => resolve(),
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
};
|
|
90
|
-
this.toggleUploader = async (index) => {
|
|
91
|
-
this.isOpen[index] = !this.isOpen[index];
|
|
92
|
-
Helper.toggleElementClassIf(this.contentRefs[index], 'is-closed', 'is-opened', () => !this.isOpen[index]);
|
|
93
|
-
await (this.isOpen[index] ? this.onOpen(index) : this.onClose(index));
|
|
94
|
-
await new Promise((resolve) => setTimeout(resolve, 101));
|
|
95
|
-
if (this.body && this.currentTab) {
|
|
96
|
-
setTimeout(() => this.body.setAttribute('style', `height:${this.currentTab.offsetHeight + (this.editMode ? 60 : 0)}px`));
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
salla.onReady(() => {
|
|
100
|
-
this.orderId = salla.config.get('page.id');
|
|
101
|
-
});
|
|
102
|
-
salla.lang.onLoaded(() => {
|
|
103
|
-
this.contactUsLabel = salla.lang.get('blocks.footer.social');
|
|
104
|
-
const setNestedAsync = (lang, key, value) => {
|
|
105
|
-
return new Promise((resolve) => {
|
|
106
|
-
salla.helpers.setNested(salla.lang.messages[lang], key, value);
|
|
107
|
-
resolve(true);
|
|
108
|
-
});
|
|
109
|
-
};
|
|
110
|
-
const setTranslations = async () => {
|
|
111
|
-
await setNestedAsync('ar.trans', 'common.uploader.drag_and_drop_files', 'اسحب الملفات وأفلتها هنا');
|
|
112
|
-
await setNestedAsync('en.trans', 'common.uploader.drag_and_drop_files', 'Drag and drop files here');
|
|
113
|
-
await setNestedAsync('ar.trans', 'common.uploader.allowed_images_types', ' .jpg أو jpeg أو png يُسمح بإضافة صور بصيغة');
|
|
114
|
-
await setNestedAsync('en.trans', 'common.uploader.allowed_images_types', 'Images in jpg, jpeg, or png format are allowed.');
|
|
115
|
-
await setNestedAsync('ar.trans', 'pages.rating.add_images', 'اضافة صور');
|
|
116
|
-
await setNestedAsync('en.trans', 'pages.rating.add_images', 'Add Images');
|
|
117
|
-
await setNestedAsync('ar.trans', 'pages.rating.edit_images', 'تعديل الصور');
|
|
118
|
-
await setNestedAsync('en.trans', 'pages.rating.edit_images', 'Edit Images');
|
|
119
|
-
await setNestedAsync('ar.trans', 'pages.rating.edit_review', 'تعديل التقييم');
|
|
120
|
-
await setNestedAsync('en.trans', 'pages.rating.edit_review', 'Edit review');
|
|
121
|
-
await setNestedAsync('ar.trans', 'pages.rating.confirm_deletion', 'تأكيد حذف التقييم');
|
|
122
|
-
await setNestedAsync('en.trans', 'pages.rating.confirm_deletion', 'Confirm review deletion');
|
|
123
|
-
await setNestedAsync('ar.trans', 'pages.rating.are_you_sure_you_want_to_delete_review', 'هل أنت متأكد من حذف تقييمك؟');
|
|
124
|
-
await setNestedAsync('en.trans', 'pages.rating.are_you_sure_you_want_to_delete_review', 'Are you sure you want to delete your review?');
|
|
125
|
-
await setNestedAsync('ar.trans', 'pages.rating.review_updated_successfully', 'تم تعديل التقييم بنجاح');
|
|
126
|
-
await setNestedAsync('en.trans', 'pages.rating.review_updated_successfully', 'The review has been successfully updated.');
|
|
127
|
-
await setNestedAsync('ar.trans', 'pages.rating.review_deleted_successfully', 'تم حذف التقييم بنجاح');
|
|
128
|
-
await setNestedAsync('en.trans', 'pages.rating.review_deleted_successfully', 'The review has been successfully deleted.');
|
|
129
|
-
await setNestedAsync('ar.trans', 'pages.rating.images_count', 'الصور ( :current من أصل :total )');
|
|
130
|
-
await setNestedAsync('en.trans', 'pages.rating.images_count', 'Images ( :current of :total )');
|
|
131
|
-
await setNestedAsync('ar.trans', 'pages.rating.loyalty_points_for_images', 'اكسب :points نقطة ولاء عند إضافة صور لتقييمك!');
|
|
132
|
-
await setNestedAsync('en.trans', 'pages.rating.loyalty_points_for_images', 'Earn :points loyalty points when adding photos to your review!');
|
|
133
|
-
await setNestedAsync('ar.trans', 'common.uploader.max_three_images', `.أضف ${this.MAX_UPLOAD_LIMIT} صور كحد أقصى`);
|
|
134
|
-
await setNestedAsync('en.trans', 'common.uploader.max_three_images', `Add up to ${this.MAX_UPLOAD_LIMIT} images maximum.`);
|
|
135
|
-
await setNestedAsync('ar.trans', 'common.elements.confirm_delete', 'تأكيد الحذف');
|
|
136
|
-
await setNestedAsync('en.trans', 'common.elements.confirm_delete', 'Confirm deletion');
|
|
137
|
-
this.dragAndDropFilesLabel = salla.lang.get('common.uploader.drag_and_drop_files');
|
|
138
|
-
this.allowedImagesTypesLabel = salla.lang.get('common.uploader.allowed_images_types');
|
|
139
|
-
this.addImagesLabel = salla.lang.get('pages.rating.add_images');
|
|
140
|
-
this.threeImagesMax = salla.lang.get('common.uploader.max_three_images');
|
|
141
|
-
this.contactSubjectLabel = salla.lang.get('pages.rating.contact_subject');
|
|
142
|
-
this.editReviewLabel = salla.lang.get('pages.rating.edit_review');
|
|
143
|
-
this.editImagesLabel = salla.lang.get('pages.rating.edit_images');
|
|
144
|
-
this.areYouSureLabel = salla.lang.get('pages.rating.are_you_sure_you_want_to_delete_review');
|
|
145
|
-
this.confirmDeletionLabel = salla.lang.get('pages.rating.confirm_deletion');
|
|
146
|
-
this.cancelLabel = salla.lang.get("common.elements.cancel");
|
|
147
|
-
this.updatedSuccessfullyLabel = salla.lang.get("pages.rating.review_updated_successfully");
|
|
148
|
-
this.deletedSuccessfullyLabel = salla.lang.get("pages.rating.review_deleted_successfully");
|
|
149
|
-
this.confirmDeleteBtn = salla.lang.get("common.elements.confirm_delete");
|
|
150
|
-
this.loyaltyPointsForImagesLabel = salla.lang.get('pages.rating.loyalty_points_for_images', { points: ':points' });
|
|
151
|
-
this.contact_body = (store, id, customer) => salla.lang.get('pages.rating.contact_body', { store, id, customer });
|
|
152
|
-
};
|
|
153
|
-
setTranslations();
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
getV2Ref() {
|
|
157
|
-
return this.v2Ref ?? this.host.querySelector('salla-rating-modal-v2');
|
|
158
|
-
}
|
|
159
|
-
syncNewPopUpFlag() {
|
|
160
|
-
// Enable the new pop-up to all consumers:
|
|
161
|
-
this.enableNewPopUp = true;
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Point the modal at a different order/product and invalidate any cached
|
|
165
|
-
* order so the next open() re-fetches instead of reusing stale data.
|
|
166
|
-
* Pass `orderId` as `null` for an eligible-but-unverified product review.
|
|
167
|
-
*/
|
|
168
|
-
async setOrder(orderId, productId) {
|
|
169
|
-
this.orderId = orderId;
|
|
170
|
-
this.productId = productId;
|
|
171
|
-
this.order = undefined;
|
|
172
|
-
await this.getV2Ref()?.setOrder(orderId, productId);
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Show the rating modal
|
|
176
|
-
*/
|
|
177
|
-
async open() {
|
|
178
|
-
await salla.onReady();
|
|
179
|
-
this.syncNewPopUpFlag();
|
|
180
|
-
if (this.enableNewPopUp) {
|
|
181
|
-
return this.getV2Ref()?.open();
|
|
182
|
-
}
|
|
183
|
-
this.defaultMode = true;
|
|
184
|
-
return new Promise((resolve) => {
|
|
185
|
-
setTimeout(() => {
|
|
186
|
-
this.modal.open().then(() => this.order || salla.api.withoutNotifier(() => salla.rating.api.order(this.orderId ? this.orderId : salla.config.get('page.id'))).then(res => this.order = res.data))
|
|
187
|
-
.then(() => this.readyUpLoyaltyPoints())
|
|
188
|
-
.then(() => this.modal.setTitle(`${salla.lang.get('pages.rating.rate_order')} <span class="unicode">(#${this.order.id})</span>`))
|
|
189
|
-
.then(() => {
|
|
190
|
-
// Initialize productImages for all products
|
|
191
|
-
const initialImages = {};
|
|
192
|
-
if (this.order?.products) {
|
|
193
|
-
for (const item of this.order.products) {
|
|
194
|
-
initialImages[item.product.id] = [];
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
this.productImages = initialImages;
|
|
198
|
-
})
|
|
199
|
-
.then(() => this.modal.stopLoading())
|
|
200
|
-
.then(() => this.stepsCount = [this.order.testimonials_enabled, this.order.products_enabled, this.order.shipping_enabled].filter(enabled => enabled).length)
|
|
201
|
-
.then(() => setTimeout(() => this.handleWizard(), 100))
|
|
202
|
-
.catch(e => {
|
|
203
|
-
resolve(false);
|
|
204
|
-
this.hasError = true;
|
|
205
|
-
this.errorMessage = e.response?.data?.error?.message || e.response?.data;
|
|
206
|
-
this.modal.stopLoading();
|
|
207
|
-
});
|
|
208
|
-
resolve(true);
|
|
209
|
-
}, 50);
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
async openEditModal(params) {
|
|
213
|
-
await salla.onReady();
|
|
214
|
-
this.syncNewPopUpFlag();
|
|
215
|
-
if (this.enableNewPopUp) {
|
|
216
|
-
return this.getV2Ref()?.openEditModal(params);
|
|
217
|
-
}
|
|
218
|
-
this.defaultMode = false;
|
|
219
|
-
this.editMode = true;
|
|
220
|
-
this.editType = params.type;
|
|
221
|
-
this.editFeedbackId = params.feedback_id;
|
|
222
|
-
try {
|
|
223
|
-
await this.fetchEditItem(params.feedback_id);
|
|
224
|
-
await this.readyUpLoyaltyPoints();
|
|
225
|
-
this.editModal.open();
|
|
226
|
-
}
|
|
227
|
-
catch (e) {
|
|
228
|
-
this.hasError = true;
|
|
229
|
-
this.errorMessage = e.response?.data?.error?.message || e.response?.data;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
async fetchEditItem(feedbackId) {
|
|
233
|
-
const endpoint = `rating/${feedbackId}/show`;
|
|
234
|
-
const response = await salla.api.request(endpoint);
|
|
235
|
-
this.editItem = response.data;
|
|
236
|
-
if (this.allowAttachImages && this.editType == "product" && this.editItem.images.length) {
|
|
237
|
-
this.editItemImages = this.editItem.images.map(img => ({ id: img, url: img }));
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
async editReview() {
|
|
241
|
-
const data = {};
|
|
242
|
-
this.editModal.querySelectorAll('[name]').forEach((input) => {
|
|
243
|
-
const inputData = salla.helpers.inputData(input.name, input.value, data);
|
|
244
|
-
data[inputData.name] = inputData.value;
|
|
245
|
-
});
|
|
246
|
-
data.images && (data.images = data.images.split(','));
|
|
247
|
-
const endpoint = `rating/${this.editFeedbackId}`;
|
|
248
|
-
await salla.api.request(endpoint, data, 'put').then((res) => {
|
|
249
|
-
this.editModal.close();
|
|
250
|
-
salla.notify.success(res.message || this.updatedSuccessfullyLabel);
|
|
251
|
-
setTimeout(() => {
|
|
252
|
-
window.location.reload();
|
|
253
|
-
}, 500);
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
async openDeleteModal(params) {
|
|
257
|
-
await salla.onReady();
|
|
258
|
-
this.syncNewPopUpFlag();
|
|
259
|
-
if (this.enableNewPopUp) {
|
|
260
|
-
return this.getV2Ref()?.openDeleteModal(params);
|
|
261
|
-
}
|
|
262
|
-
this.defaultMode = false;
|
|
263
|
-
this.deleteMode = true;
|
|
264
|
-
this.deleteFeedbackId = params.feedback_id;
|
|
265
|
-
this.shouldOpenDeleteModal = true;
|
|
266
|
-
return new Promise((resolve) => {
|
|
267
|
-
setTimeout(() => {
|
|
268
|
-
this.deleteModal.open().then(() => resolve(true));
|
|
269
|
-
}, 50);
|
|
270
|
-
});
|
|
271
|
-
}
|
|
272
|
-
async deleteReview() {
|
|
273
|
-
const endpoint = `rating/${this.deleteFeedbackId}`;
|
|
274
|
-
await salla.api.request(endpoint, null, 'delete').then(() => {
|
|
275
|
-
this.deleteModal.close();
|
|
276
|
-
salla.notify.success(this.deletedSuccessfullyLabel);
|
|
277
|
-
setTimeout(() => {
|
|
278
|
-
window.location.reload();
|
|
279
|
-
}, 500);
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
/**
|
|
283
|
-
* Show the rating modal
|
|
284
|
-
*/
|
|
285
|
-
async close() {
|
|
286
|
-
if (this.enableNewPopUp) {
|
|
287
|
-
return this.getV2Ref()?.close();
|
|
288
|
-
}
|
|
289
|
-
return this.modal.close();
|
|
290
|
-
}
|
|
291
|
-
// handle wizard
|
|
292
|
-
handleWizard() {
|
|
293
|
-
this.steps = this.modal.querySelectorAll(".s-rating-modal-step");
|
|
294
|
-
this.dots = this.modal.querySelectorAll(".s-rating-modal-step-dot");
|
|
295
|
-
this.showActiveStep();
|
|
296
|
-
}
|
|
297
|
-
showActiveStep(current = null) {
|
|
298
|
-
this.currentTab = current || this.steps[this.currentIndex];
|
|
299
|
-
Helper.toggleClassIf('.s-rating-modal-step-dot', 's-rating-modal-bg-gray', 's-rating-modal-bg-primary', dot => dot != this.dots[this.currentIndex])
|
|
300
|
-
.toggleClassIf('.s-rating-modal-step', 's-rating-modal-active', 's-rating-modal-hidden', tab => tab == this.currentTab);
|
|
301
|
-
if (this.currentIndex !== 0) {
|
|
302
|
-
// the animation
|
|
303
|
-
Helper.toggleElementClassIf(this.currentTab, 's-rating-modal-unactive', 's-rating-modal-hidden', () => true);
|
|
304
|
-
setTimeout(() => Helper.toggleElementClassIf(this.currentTab, 's-rating-modal-active', 's-rating-modal-unactive', () => true), 300);
|
|
305
|
-
}
|
|
306
|
-
// Btn text
|
|
307
|
-
const nextType = this.steps[this.currentIndex + 1]?.dataset.type;
|
|
308
|
-
this.nextBtn?.setText(nextType ? `${salla.lang.get('pages.rating.rate')} ${salla.lang.get(`pages.rating.${nextType}`)}`
|
|
309
|
-
: salla.lang.get('pages.rating.send_ratings'));
|
|
310
|
-
setTimeout(() => this.body?.setAttribute('style', `height:${this.currentTab?.offsetHeight}px`));
|
|
311
|
-
}
|
|
312
|
-
previousTab() {
|
|
313
|
-
this.currentIndex > 0 && this.currentIndex--;
|
|
314
|
-
Helper.toggleElementClassIf(this.backBtn, 's-rating-modal-unvisiable', 'block', () => this.currentIndex == 0);
|
|
315
|
-
this.showActiveStep();
|
|
316
|
-
}
|
|
317
|
-
submit() {
|
|
318
|
-
this.submittedBefore() || this.validate();
|
|
319
|
-
salla.config.canLeave = false;
|
|
320
|
-
this.nextBtn.load()
|
|
321
|
-
.then(() => this.submittedBefore() || this.sendFeedback())
|
|
322
|
-
.then(() => this.currentTab.querySelectorAll('[name],.s-rating-modal-btn-star').forEach(el => el.setAttribute('disabled', '')))
|
|
323
|
-
.then(() => this.currentIndex < this.stepsCount && this.currentIndex++)
|
|
324
|
-
.then(() => this.showActiveStep())
|
|
325
|
-
.then(() => Helper.toggleClassIf('#prev-btn', 'block', 's-rating-modal-unvisiable', () => true))
|
|
326
|
-
.finally(() => {
|
|
327
|
-
this.nextBtn.stop();
|
|
328
|
-
salla.config.canLeave = true;
|
|
329
|
-
if (this.currentIndex == this.stepsCount) {
|
|
330
|
-
this.showThankYou();
|
|
331
|
-
this.showContactWidget = false;
|
|
332
|
-
}
|
|
333
|
-
// this.modal.isClosable = false;
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
|
-
submittedBefore() {
|
|
337
|
-
return this.submitted.includes(this.currentIndex);
|
|
338
|
-
}
|
|
339
|
-
validate(rating = null, type = null) {
|
|
340
|
-
if (!rating && this.currentTab.dataset.type === 'products') {
|
|
341
|
-
const ratingForms = this.currentTab.querySelectorAll('.rating-outer-form');
|
|
342
|
-
ratingForms.forEach(ratingForm => this.validate(ratingForm, 'product'));
|
|
343
|
-
return;
|
|
344
|
-
}
|
|
345
|
-
rating = rating || this.currentTab;
|
|
346
|
-
const stars = rating.querySelector('.rating_hidden_input').value;
|
|
347
|
-
const validationMessage = rating.querySelector('.s-rating-modal-validation-msg');
|
|
348
|
-
type = type || rating.dataset.type;
|
|
349
|
-
if (!stars) {
|
|
350
|
-
validationMessage.innerHTML = salla.lang.get(`pages.rating.rate_${type}_stars`).replace(' (:item)', '');
|
|
351
|
-
throw new Error(validationMessage.innerHTML);
|
|
352
|
-
}
|
|
353
|
-
validationMessage.innerHTML = '';
|
|
354
|
-
}
|
|
355
|
-
sendFeedback() {
|
|
356
|
-
const data = {};
|
|
357
|
-
this.currentTab.querySelectorAll('[name]').forEach((input) => {
|
|
358
|
-
//decode names like `<input name="jamal[inner]" value="hi">` to be {name:jamal, value: {inner:"hi"}}
|
|
359
|
-
const inputData = salla.helpers.inputData(input.name, input.value, data);
|
|
360
|
-
data[inputData.name] = inputData.value;
|
|
361
|
-
});
|
|
362
|
-
if (this.allowAttachImages && data.products) {
|
|
363
|
-
for (let productIndex in data.products) {
|
|
364
|
-
if (data.products[productIndex].images) {
|
|
365
|
-
data.products[productIndex].images = data.products[productIndex].images.split(',');
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
if (Object.keys(data).length == 0) {
|
|
370
|
-
return;
|
|
371
|
-
}
|
|
372
|
-
data.order_id = this.orderId;
|
|
373
|
-
data.type = this.currentTab.dataset.type;
|
|
374
|
-
return salla.rating.api[this.currentTab.dataset.type](data).then((res) => {
|
|
375
|
-
this.submitted.push(this.currentIndex);
|
|
376
|
-
return res;
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
|
-
showThankYou() {
|
|
380
|
-
let seconds = 10;
|
|
381
|
-
let timeToClose = setInterval(() => {
|
|
382
|
-
this.thanksTime.innerHTML = `00:0${seconds--}`;
|
|
383
|
-
if (seconds > 0) {
|
|
384
|
-
return;
|
|
385
|
-
}
|
|
386
|
-
clearInterval(timeToClose);
|
|
387
|
-
this.thanksTime.remove();
|
|
388
|
-
this.close().then(() => window.location.reload());
|
|
389
|
-
}, 1000);
|
|
390
|
-
this.modal.querySelector('.s-rating-modal-footer').classList.add('s-rating-modal-unvisiable');
|
|
391
|
-
this.showActiveStep(this.thanksTab);
|
|
392
|
-
}
|
|
393
|
-
getFilepondPlaceholder() {
|
|
394
|
-
return `<div class="s-rating-modal-filepond-placeholder"><span class="s-rating-modal-filepond-placeholder-icon">${ImageIcon}</span><p class="s-rating-modal-filepond-placeholder-text">${this.dragAndDropFilesLabel}<br>
|
|
395
|
-
<span> ${this.allowedImagesTypesLabel} <br> ${this.threeImagesMax} </span></p></div>`;
|
|
396
|
-
}
|
|
397
|
-
getCustomerName() {
|
|
398
|
-
let firstName = salla.config.get('user.first_name') || salla.storage.get('user.first_name') || '';
|
|
399
|
-
let lasName = salla.config.get('user.last_name') || salla.storage.get('user.last_name') || '';
|
|
400
|
-
return `${firstName} ${lasName}`;
|
|
401
|
-
}
|
|
402
|
-
handleSendEmail() {
|
|
403
|
-
const subject = `${this.contactSubjectLabel} #${this.order.id}`;
|
|
404
|
-
const body = this.contact_body(salla.config.get('store.name'), this.order.id, this.getCustomerName());
|
|
405
|
-
const mailtoLink = `mailto:${salla.config.get('store.contacts.email')}?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`;
|
|
406
|
-
window.open(mailtoLink, '_blank');
|
|
407
|
-
}
|
|
408
|
-
handleSendWhatsApp() {
|
|
409
|
-
const body = this.contact_body(salla.config.get('store.name'), this.order.id, this.getCustomerName());
|
|
410
|
-
const whatsappLink = `https://wa.me/${salla.config.get('store.contacts.whatsapp')}?text=${encodeURIComponent(body)}`;
|
|
411
|
-
window.open(whatsappLink, '_blank');
|
|
412
|
-
}
|
|
413
|
-
resetData(isOpen) {
|
|
414
|
-
if (isOpen.detail) {
|
|
415
|
-
return;
|
|
416
|
-
}
|
|
417
|
-
this.modal?.close();
|
|
418
|
-
this.editItem = null;
|
|
419
|
-
this.editItemImages = [];
|
|
420
|
-
this.hiddenInputs[1] && (this.hiddenInputs[1].value = '');
|
|
421
|
-
this.deleteFeedbackId = null;
|
|
422
|
-
this.editFeedbackId = null;
|
|
423
|
-
this.shouldOpenDeleteModal = false;
|
|
424
|
-
this.editMode = false;
|
|
425
|
-
this.deleteMode = false;
|
|
426
|
-
this.defaultMode = false;
|
|
427
|
-
this.loyaltyImageRatingPoints = 0;
|
|
428
|
-
}
|
|
429
|
-
async readyUpLoyaltyPoints() {
|
|
430
|
-
const featureEnabled = salla.loyalty?.isFeatureEnabled?.();
|
|
431
|
-
if (!featureEnabled) {
|
|
432
|
-
this.loyaltyImageRatingPoints = 0;
|
|
433
|
-
return;
|
|
434
|
-
}
|
|
435
|
-
const rating_product_points = salla.config.get('store.settings.rating.rating_product_points') || 0;
|
|
436
|
-
const rating_product_with_image_points = salla.config.get('store.settings.rating.rating_product_with_image_points') || 0;
|
|
437
|
-
this.loyaltyImageRatingPoints = Number(rating_product_with_image_points) + Number(rating_product_points);
|
|
438
|
-
}
|
|
439
|
-
loyaltyPointsNote() {
|
|
440
|
-
if (!this.loyaltyImageRatingPoints || !this.loyaltyPointsForImagesLabel) {
|
|
441
|
-
return null;
|
|
442
|
-
}
|
|
443
|
-
const svgIcon = (h("svg", { width: "17", height: "17", viewBox: "0 0 17 17", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M10 0C13.6819 0 16.6667 2.98477 16.6667 6.66664C16.6667 9.37047 15.057 11.6984 12.7437 12.7444C11.6978 15.0575 9.3701 16.6666 6.66668 16.6666C2.98477 16.6666 0 13.6819 0 9.99998C0 7.29656 1.60918 4.96894 3.92195 3.92276C4.96827 1.60964 7.29618 0 10 0ZM6.66668 5C3.90524 5 1.66667 7.23856 1.66667 9.99998C1.66667 12.7614 3.90524 15 6.66668 15C9.4281 15 11.6667 12.7614 11.6667 9.99998C11.6667 7.23856 9.4281 5 6.66668 5ZM7.50002 5.83333V6.66664H9.16668V8.33331H5.83333C5.60322 8.33331 5.41667 8.51989 5.41667 8.74998C5.41667 8.95456 5.56407 9.12464 5.75844 9.15998L5.83333 9.16664H7.50002C8.6506 9.16664 9.58335 10.0994 9.58335 11.25C9.58335 12.4006 8.6506 13.3333 7.50002 13.3333V14.1666H5.83333V13.3333H4.16667V11.6666H7.50002C7.7301 11.6666 7.91668 11.4801 7.91668 11.25C7.91668 11.0455 7.76927 10.8753 7.57493 10.8401L7.50002 10.8333H5.83333C4.68274 10.8333 3.75 9.90056 3.75 8.74998C3.75 7.59939 4.68274 6.66664 5.83333 6.66664V5.83333H7.50002ZM10 1.66667C8.51377 1.66667 7.17893 2.31513 6.26313 3.34457C6.39704 3.33736 6.53138 3.33333 6.66668 3.33333C10.3486 3.33333 13.3333 6.3181 13.3333 9.99998C13.3333 10.1356 13.3293 10.2702 13.3213 10.4037C14.3513 9.48814 15 8.15314 15 6.66664C15 3.90524 12.7614 1.66667 10 1.66667Z", fill: "#008C56" })));
|
|
444
|
-
return (h("div", { class: "s-rating-modal-loyalty-points-note-container" }, h("span", { class: "s-rating-modal-loyalty-points-note-icon" }, svgIcon), h("p", { class: "s-rating-modal-loyalty-points-note-text" }, this.loyaltyPointsForImagesLabel.replace(':points', String(this.loyaltyImageRatingPoints)))));
|
|
445
|
-
}
|
|
446
|
-
getDeleteModal() {
|
|
447
|
-
return (h("salla-modal", { ref: modal => this.deleteModal = modal, width: "xs", onModalVisibilityChanged: (isOpen) => this.resetData(isOpen) }, h("div", { class: "s-rating-modal-delete-wrapper", ref: el => this.body = el }, h("h3", null, this.confirmDeletionLabel), h("p", null, this.areYouSureLabel), h("div", { class: "s-rating-modal-delete-actions" }, h("salla-button", { loaderPosition: 'center', onClick: () => this.deleteReview() }, this.confirmDeleteBtn), h("salla-button", { color: 'danger', fill: 'outline', onClick: () => this.deleteModal.close() }, this.cancelLabel)))));
|
|
448
|
-
}
|
|
449
|
-
renderUploadedImagesCount(productId) {
|
|
450
|
-
// In edit mode, use editItemImages; in default mode, use productImages
|
|
451
|
-
const imageCount = this.editMode ? this.editItemImages.length : (this.productImages[productId] || []).length;
|
|
452
|
-
return (h("span", { class: "s-rating-modal-upload-count" }, salla.lang.choice("pages.rating.images_count", imageCount, { current: imageCount, total: this.MAX_UPLOAD_LIMIT })));
|
|
453
|
-
}
|
|
454
|
-
getEditModal() {
|
|
455
|
-
return (h("salla-modal", { ref: modal => this.editModal = modal, width: "md", onModalVisibilityChanged: (isOpen) => this.resetData(isOpen) }, h("div", { class: "s-rating-modal-edit-wrapper", ref: el => this.body = el }, this.editType === "store" && this.editItem ? (h("div", { class: "rating-outer-form s-rating-modal-step-wrap s-rating-modal-step", "data-type": "store", ref: currentTab => this.currentTab = currentTab }, h("div", { class: "s-rating-modal-rounded-icon" }, h("img", { src: salla.config.get('store.logo', 'https://assets.salla.sa/cp/assets/images/logo-new.png'), alt: "store name", class: "s-rating-modal-store-logo" })), h("h2", { class: "s-rating-modal-title" }, salla.lang.get('pages.rating.rate_the_store')), h("div", { class: "s-rating-modal-stars-company" }, h("salla-rating-stars", { withLabel: true, size: "large", editable: true, value: this.editItem.stars })), h("textarea", { name: "content", value: this.editItem.content, class: "s-rating-modal-comment", placeholder: salla.lang.get('pages.rating.write_store_rate') }), h("small", { class: "s-rating-modal-validation-msg" }))) : null, this.editType === "shipping" && this.editItem ? (h("div", { class: "rating-outer-form s-rating-modal-step-wrap s-rating-modal-step", "data-type": "shipping", ref: currentTab => this.currentTab = currentTab }, this.editItem.shipping.logo
|
|
456
|
-
? h("div", { class: "s-rating-modal-rounded-icon" }, h("img", { src: this.editItem.shipping.logo, class: "s-rating-modal-shipping-logo", alt: this.editItem.shipping.name }))
|
|
457
|
-
: h("span", { class: "s-rating-modal-icon", innerHTML: ShippingFast }), h("div", { class: "s-rating-modal-title" }, " ", `${salla.lang.get('pages.rating.rate_shipping')} ${this.editItem.shipping.name}`), h("div", { class: "s-rating-modal-stars-company" }, h("salla-rating-stars", { withLabel: true, size: "large", editable: true, value: this.editItem.stars })), h("textarea", { name: "content", class: "s-rating-modal-comment", value: this.editItem.content, placeholder: salla.lang.get('pages.rating.write_shipping_rate') }), h("small", { class: "s-rating-modal-validation-msg" }))) : null, this.editType == "product" && this.editItem ? h("section", { class: "s-rating-modal-step", "data-type": "products", ref: currentTab => this.currentTab = currentTab }, h("div", { class: "s-rating-modal-product" }, this.allowAttachImages && this.loyaltyPointsNote(), h("div", { class: "rating-outer-form", "data-stars-error": salla.lang.get('pages.rating.rate_product_stars') }, h("div", { class: "s-rating-modal-product-img-wrap" }, h("img", { src: this.editItem.product.image.url, alt: this.editItem.product.name, class: "s-rating-modal-product-img" })), h("div", { class: "s-rating-modal-product-details" }, h("div", { class: "s-rating-modal-product-details-main" }, h("div", null, h("h3", { class: "s-rating-modal-product-title" }, " ", this.editItem.product.name), h("div", { class: "s-rating-modal-stars-product" }, h("salla-rating-stars", { withLabel: true, size: "small", editable: true, value: this.editItem.stars }))), this.allowAttachImages && h("salla-button", { class: "s-comments-item-like-btn mt-0", loaderPosition: 'center', fill: 'outline', size: 'small', onClick: () => this.toggleUploader(1) }, h("span", null, this.editItemImages.length ? this.editImagesLabel : this.addImagesLabel), h("span", { innerHTML: ImageIcon }))), h("textarea", { value: this.editItem.content, placeholder: salla.lang.get('pages.rating.write_product_rate'), name: "content", class: "s-rating-modal-comment" }), h("small", { class: "s-rating-modal-validation-msg" }))), this.allowAttachImages && (h("div", { class: "s-rating-modal-uploader is-closed", ref: (el) => (this.contentRefs[1] = el) }, h("salla-file-upload", { name: "images", allowMultiple: true, maxFilesCount: this.MAX_UPLOAD_LIMIT, imagePreviewHeight: 117, filePosterHeight: 117, "instant-upload": true, type: "feedback", files: JSON.stringify(this.editItemImages), payloadName: "files[]", id: `file-${this.editItem.product.id}`, title: this.editItem.product.name, instantUpload: true, accept: "image/png, image/jpeg, image/jpg", url: salla.url.api('upload'), onUploaded: (e) => {
|
|
458
|
-
this.editItemImages = [...this.editItemImages, e.detail];
|
|
459
|
-
this.hiddenInputs[1].value = this.editItemImages.map(img => img.url).join();
|
|
460
|
-
}, onRemoved: (e) => {
|
|
461
|
-
const removedId = e.detail;
|
|
462
|
-
if (!removedId)
|
|
463
|
-
return;
|
|
464
|
-
this.editItemImages = this.editItemImages.filter(img => img.id !== removedId);
|
|
465
|
-
this.hiddenInputs[1].value = this.editItemImages.map(img => img.url).join();
|
|
466
|
-
}, labelIdle: this.getFilepondPlaceholder() }), h("input", { type: "hidden", name: "images", value: this.editItem.images.join(','), ref: (el) => (this.hiddenInputs[1] = el) }), this.renderUploadedImagesCount(this.editItem.product.id)))))
|
|
467
|
-
: null, h("div", { class: "s-rating-modal-footer s-rating-modal-footer-end" }, h("salla-button", { "loader-position": 'center', onClick: () => this.editReview() }, this.editReviewLabel)))));
|
|
468
|
-
}
|
|
469
|
-
render() {
|
|
470
|
-
if (this.enableNewPopUp) {
|
|
471
|
-
return (h(Host, { class: "s-rating-modal" }, h("salla-rating-modal-v2", { ref: (el) => (this.v2Ref = el), orderId: this.orderId, productId: this.productId })));
|
|
472
|
-
}
|
|
473
|
-
if (this.deleteMode) {
|
|
474
|
-
return h(Host, { class: "s-rating-modal" }, this.getDeleteModal());
|
|
475
|
-
}
|
|
476
|
-
if (this.editMode) {
|
|
477
|
-
return h(Host, { class: "s-rating-modal" }, this.getEditModal());
|
|
478
|
-
}
|
|
479
|
-
if (this.defaultMode) {
|
|
480
|
-
return (h(Host, { class: "s-rating-modal" }, h("salla-modal", { class: "s-rating-modal-wrap", onModalVisibilityChanged: (isOpen) => this.resetData(isOpen), isLoading: true, width: "md", ref: modal => this.modal = modal }, h("div", { slot: 'loading' }, h("div", { class: "s-rating-modal-skeleton" }, h("salla-skeleton", { type: 'circle', height: '80px', width: '80px' }), h("salla-skeleton", { height: '15px', width: '60%' }), h("salla-skeleton", { height: '10px', width: '30%' }), h("div", { class: "s-rating-modal-skeleton-stars" }, [...Array(5)].map((v) => h("div", { key: v, innerHTML: WishListIcon }))), h("salla-skeleton", { height: '100px', width: '100%' }), h("div", { class: "s-rating-modal-skeleton-footer" }, h("salla-skeleton", { height: '40px', width: '30%' })))), !this.hasError && this.order
|
|
481
|
-
? [h("div", { class: "s-rating-modal-wrapper", ref: el => this.body = el }, this.order?.testimonials_enabled ?
|
|
482
|
-
h("div", { class: "rating-outer-form s-rating-modal-step-wrap s-rating-modal-step s-rating-modal-hidden", "data-type": "store" }, h("div", { class: "s-rating-modal-rounded-icon" }, h("img", { src: salla.config.get('store.logo', 'https://assets.salla.sa/cp/assets/images/logo-new.png'), alt: "store name", class: "s-rating-modal-store-logo" })), h("h2", { class: "s-rating-modal-title" }, salla.lang.get('pages.rating.rate_the_store')), h("div", { class: "s-rating-modal-stars-company" }, h("salla-rating-stars", { withLabel: true, size: "large" })), h("textarea", { name: "comment", class: "s-rating-modal-comment", placeholder: salla.lang.get('pages.rating.write_store_rate') }), h("small", { class: "s-rating-modal-validation-msg" }))
|
|
483
|
-
: '', this.order.products_enabled
|
|
484
|
-
? h("section", { class: "s-rating-modal-step s-rating-modal-hidden", "data-type": "products" }, this.allowAttachImages && this.loyaltyPointsNote(), this.order.products.map((item, index) => h("div", { class: "s-rating-modal-product", key: index }, h("div", { class: "rating-outer-form", "data-stars-error": salla.lang.get('pages.rating.rate_product_stars') }, h("div", { class: "s-rating-modal-product-img-wrap" }, h("img", { src: item.product.thumbnail, alt: item.product.name, class: "s-rating-modal-product-img" })), h("div", { class: "s-rating-modal-product-details" }, h("div", { class: "s-rating-modal-product-details-main" }, h("div", null, h("h3", { class: "s-rating-modal-product-title" }, " ", item.product.name), h("div", { class: "s-rating-modal-stars-product" }, h("salla-rating-stars", { withLabel: true, size: "small", name: `products[${index}][rating]` }))), this.allowAttachImages && h("salla-button", { class: "s-comments-item-like-btn mt-0", loaderPosition: 'center', fill: 'outline', size: 'small', onClick: () => this.toggleUploader(index) }, h("span", null, this.addImagesLabel), h("span", { innerHTML: ImageIcon }))), h("input", { type: "hidden", name: `products[${index}][product_id]`, value: item.product.id }), h("textarea", { placeholder: salla.lang.get('pages.rating.write_product_rate'), name: `products[${index}][comment]`, class: "s-rating-modal-comment" }), h("small", { class: "s-rating-modal-validation-msg" }))), this.allowAttachImages && (h("div", { class: "s-rating-modal-uploader is-closed", ref: (el) => (this.contentRefs[index] = el) }, h("salla-file-upload", { name: "image", maxFilesCount: this.MAX_UPLOAD_LIMIT, imagePreviewHeight: 117, "instant-upload": true, type: "feedback", payloadName: "files[]", id: `file-${item.product.id}`, title: item.product.name, allowMultiple: true, instantUpload: true, accept: "image/png, image/jpeg, image/jpg", url: salla.url.api('upload'), onUploaded: (e) => {
|
|
485
|
-
this.productImages = {
|
|
486
|
-
...this.productImages,
|
|
487
|
-
[item.product.id]: [...(this.productImages[item.product.id] || []), e.detail]
|
|
488
|
-
};
|
|
489
|
-
this.hiddenInputs[index].value = this.productImages[item.product.id].map(img => img.url).join(',');
|
|
490
|
-
}, onRemoved: (e) => {
|
|
491
|
-
const removedId = e.detail;
|
|
492
|
-
if (!removedId || !this.productImages[item.product.id])
|
|
493
|
-
return;
|
|
494
|
-
this.productImages = {
|
|
495
|
-
...this.productImages,
|
|
496
|
-
[item.product.id]: this.productImages[item.product.id].filter(img => img.id !== removedId)
|
|
497
|
-
};
|
|
498
|
-
this.hiddenInputs[index].value = this.productImages[item.product.id].map(img => img.url).join(',');
|
|
499
|
-
}, labelIdle: this.getFilepondPlaceholder() }), h("input", { type: "hidden", name: `products[${index}][images]`, value: (this.productImages[item.product.id] || []).map(img => img.url).join(','), ref: (el) => (this.hiddenInputs[index] = el) }), this.renderUploadedImagesCount(item.product.id))))))
|
|
500
|
-
: '', this.order.shipping_enabled && this.order.shipping?.company
|
|
501
|
-
? h("div", { class: "rating-outer-form s-rating-modal-step-wrap s-rating-modal-step s-rating-modal-hidden", "data-type": "shipping" }, h("input", { type: "hidden", name: "shipping_company_id", value: this.order.shipping.company.id }), this.order.shipping.company.logo
|
|
502
|
-
? h("div", { class: "s-rating-modal-rounded-icon" }, h("img", { src: this.order.shipping.company.logo, class: "s-rating-modal-shipping-logo", alt: this.order.shipping.company.name }))
|
|
503
|
-
: h("span", { class: "s-rating-modal-icon", innerHTML: ShippingFast }), h("div", { class: "s-rating-modal-title" }, " ", `${salla.lang.get('pages.rating.rate_shipping')} ${this.order.shipping.company.name}`), h("div", { class: "s-rating-modal-stars-company" }, h("salla-rating-stars", { withLabel: true, size: "large" })), h("textarea", { name: "comment", class: "s-rating-modal-comment", placeholder: salla.lang.get('pages.rating.write_shipping_rate') }), h("small", { class: "s-rating-modal-validation-msg" }))
|
|
504
|
-
: '', h("div", { class: "s-rating-modal-thanks s-rating-modal-hidden", ref: el => this.thanksTab = el }, h("span", { class: "s-rating-modal-icon", innerHTML: CheckCircle2 }), h("h3", { class: "s-rating-modal-thanks-title" }, salla.lang.get('pages.rating.thanks')), h("div", { class: "s-rating-modal-thanks-msg", innerHTML: this.order.thanks_message }), h("time", { class: "s-rating-modal-thanks-time", ref: el => this.thanksTime = el }))), this.allowContactSupport && this.showContactWidget && (salla.config.get('store.contacts.whatsapp') || salla.config.get('store.contacts.email')) ? h("div", { class: "s-rating-modal-contact" }, h("p", null, this.contactUsLabel), h("div", { class: "s-rating-modal-contact-icons" }, salla.config.get('store.contacts.whatsapp') && h("span", { onClick: () => this.handleSendWhatsApp(), innerHTML: WhatsappIcon }), salla.config.get('store.contacts.email') && h("span", { onClick: () => this.handleSendEmail(), innerHTML: MailIcon }))) : '', h("div", { class: "s-rating-modal-footer" }, h("button", { ref: el => this.backBtn = el, onClick: () => this.previousTab(), class: "s-rating-modal-btn s-rating-modal-unvisiable" }, salla.lang.get('common.elements.back')), this.stepsCount > 1 ? h("ul", { class: "s-rating-modal-dots" }, [0, 1, 2].slice(0, this.stepsCount).map((v) => h("li", { key: v, class: 's-rating-modal-bg-gray s-rating-modal-step-dot' }))) : '', h("salla-button", { "loader-position": 'center', ref: el => this.nextBtn = el, onClick: () => this.submit() }, salla.lang.get('common.elements.next')))]
|
|
505
|
-
: h("salla-placeholder", { alignment: "center" }))));
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
async componentWillLoad() {
|
|
509
|
-
salla.event.on('rating::open', (params) => {
|
|
510
|
-
const orderId = params?.orderId || salla.config.get('page.id');
|
|
511
|
-
this.setOrder(orderId, params?.productId).then(() => this.open());
|
|
512
|
-
});
|
|
513
|
-
salla.event.on('rating::edit', (params) => this.openEditModal(params));
|
|
514
|
-
salla.event.on('rating::delete', (params) => this.openDeleteModal(params));
|
|
515
|
-
await salla.onReady();
|
|
516
|
-
this.syncNewPopUpFlag();
|
|
517
|
-
}
|
|
518
|
-
componentDidLoad() {
|
|
519
|
-
salla.event.dispatch('rating::ready', this);
|
|
520
|
-
}
|
|
521
|
-
get host() { return this; }
|
|
522
|
-
static get style() { return sallaRatingModalCss; }
|
|
523
|
-
}, [0, "salla-rating-modal", {
|
|
524
|
-
"orderId": [1032, "order-id"],
|
|
525
|
-
"productId": [1032, "product-id"],
|
|
526
|
-
"order": [32],
|
|
527
|
-
"hasError": [32],
|
|
528
|
-
"showContactWidget": [32],
|
|
529
|
-
"errorMessage": [32],
|
|
530
|
-
"images": [32],
|
|
531
|
-
"productImages": [32],
|
|
532
|
-
"editItemImages": [32],
|
|
533
|
-
"contact_body": [32],
|
|
534
|
-
"editMode": [32],
|
|
535
|
-
"defaultMode": [32],
|
|
536
|
-
"deleteMode": [32],
|
|
537
|
-
"shouldOpenDeleteModal": [32],
|
|
538
|
-
"editType": [32],
|
|
539
|
-
"editFeedbackId": [32],
|
|
540
|
-
"deleteFeedbackId": [32],
|
|
541
|
-
"editItem": [32],
|
|
542
|
-
"loyaltyImageRatingPoints": [32],
|
|
543
|
-
"enableNewPopUp": [32],
|
|
544
|
-
"setOrder": [64],
|
|
545
|
-
"open": [64],
|
|
546
|
-
"close": [64]
|
|
547
|
-
}]);
|
|
548
|
-
function defineCustomElement() {
|
|
549
|
-
if (typeof customElements === "undefined") {
|
|
550
|
-
return;
|
|
551
|
-
}
|
|
552
|
-
const components = ["salla-rating-modal", "salla-attachment-view", "salla-button", "salla-file-upload", "salla-loading", "salla-modal", "salla-placeholder", "salla-rating-modal-v2", "salla-rating-stars", "salla-skeleton", "salla-slider"];
|
|
553
|
-
components.forEach(tagName => { switch (tagName) {
|
|
554
|
-
case "salla-rating-modal":
|
|
555
|
-
if (!customElements.get(tagName)) {
|
|
556
|
-
customElements.define(tagName, SallaRatingModal);
|
|
557
|
-
}
|
|
558
|
-
break;
|
|
559
|
-
case "salla-attachment-view":
|
|
560
|
-
if (!customElements.get(tagName)) {
|
|
561
|
-
defineCustomElement$a();
|
|
562
|
-
}
|
|
563
|
-
break;
|
|
564
|
-
case "salla-button":
|
|
565
|
-
if (!customElements.get(tagName)) {
|
|
566
|
-
defineCustomElement$9();
|
|
567
|
-
}
|
|
568
|
-
break;
|
|
569
|
-
case "salla-file-upload":
|
|
570
|
-
if (!customElements.get(tagName)) {
|
|
571
|
-
defineCustomElement$8();
|
|
572
|
-
}
|
|
573
|
-
break;
|
|
574
|
-
case "salla-loading":
|
|
575
|
-
if (!customElements.get(tagName)) {
|
|
576
|
-
defineCustomElement$7();
|
|
577
|
-
}
|
|
578
|
-
break;
|
|
579
|
-
case "salla-modal":
|
|
580
|
-
if (!customElements.get(tagName)) {
|
|
581
|
-
defineCustomElement$6();
|
|
582
|
-
}
|
|
583
|
-
break;
|
|
584
|
-
case "salla-placeholder":
|
|
585
|
-
if (!customElements.get(tagName)) {
|
|
586
|
-
defineCustomElement$5();
|
|
587
|
-
}
|
|
588
|
-
break;
|
|
589
|
-
case "salla-rating-modal-v2":
|
|
590
|
-
if (!customElements.get(tagName)) {
|
|
591
|
-
defineCustomElement$4();
|
|
592
|
-
}
|
|
593
|
-
break;
|
|
594
|
-
case "salla-rating-stars":
|
|
595
|
-
if (!customElements.get(tagName)) {
|
|
596
|
-
defineCustomElement$3();
|
|
597
|
-
}
|
|
598
|
-
break;
|
|
599
|
-
case "salla-skeleton":
|
|
600
|
-
if (!customElements.get(tagName)) {
|
|
601
|
-
defineCustomElement$2();
|
|
602
|
-
}
|
|
603
|
-
break;
|
|
604
|
-
case "salla-slider":
|
|
605
|
-
if (!customElements.get(tagName)) {
|
|
606
|
-
defineCustomElement$1();
|
|
607
|
-
}
|
|
608
|
-
break;
|
|
609
|
-
} });
|
|
610
|
-
}
|
|
611
|
-
defineCustomElement();
|
|
612
|
-
|
|
613
|
-
export { SallaRatingModal as S, defineCustomElement as d };
|